Tag:
print
ASCII is a 7-bit character set containing 128 characters and stands for the “American Standard Code for Information Interchange”. It was designed in the early 1960′s as a standard character set for computers and hardware devices. It contains the numbers from 0-9, the uppercase and lowercase English letters from A to Z, and some special [...]
Most programs will return an exit status of 0 if the program was successful, while a non-zero exit status usually indicates an error. You can find the exit status or exit code of the previously executed command by accessing the “$?” shell variable. $ COMMAND $ echo $? Typically when a command terminates on a [...]
For any number of reasons you may want to know the parent process ID of the current Bash script. You can find the parent process of the current Bash script or shell by printing the ‘$PPID‘ shell variable. $ echo $PPID20341
In order to control or monitor background child processes from a shell script you will need to know the PID of the child. Bash stores the PID of the last process executed in the “$!” shell variable. If you start a background process in an interactive shell it will output the PID of the child. [...]
In many cases you will need to determine the PID of a current Bash script or shell. Bash stores a specific variable that allows you to view the process ID of the current shell “$$‘. You can echo the $$ to print the current PID. $ echo $$23490