2024-12-10 21:14:56 +03:00
2024-11-23 18:20:55 +03:00
2024-12-10 21:14:56 +03:00

Simple Bash script

Bash script that can list users and there dirs, processes, output stdout and stderr to files


1. RUN and TEST

  1. Ensure the script is executable:
chmod +x script
  1. Execute with -h to list help:
./script -h

Avalible options:

-u, --users       Display a list of users and their home directories
-p, --processes   Display a list of running processes
-l, --log PATH    Redirect output to a specified file
-e, --errors PATH Redirect error output to a specified file
-h, --help        Show this message and terminate
  1. Logging example: stdout
./script -u -l /tmp/output.log

stderr

./script -u -e /tmp/error.log

stdout with stderr at the same time

./script -u -l /tmp/output.log -e /tmp/error.log

This is a full copy of Main repo: https://git.gandc.ru/gandc/z1-lk-bos

Description
No description provided
Readme 41 KiB
Languages
Shell 100%