This is an example of a bash script which checks for some running process (daemon or service) and does specific actions (reload, sends mail) if there is no such process running. check_process(){ # check the args if [ “$1” = “” ]; then return 0 fi #PROCESS_NUM => get the process number regarding the given Full Article…
Viewing 1 to 2 of 2 items
Removing Duplicate Lines With Sort, Uniq and Shell Pipes
Use the following syntax: sort {file-name} | uniq -u sort file.log | uniq -u Here is a sample test file called garbage.txt: this is a test food that are killing you wings of fire we hope that the labor spent in creating this software this is a test unix ips as well as enjoy our Full Article…