1⟩ What are PIDs?
They are process IDs given to processes. A PID can vary from 0 to 65535.
“Shell Scripting Interview Questions and Answers will guide us now that a shell script is a script written for the shell, or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. Learn Shell Scripting with this Shell Scripting Interview Questions with Answers guide”
They are process IDs given to processes. A PID can vary from 0 to 65535.
rm
mail somebody@rendc.org -s ‘Your subject’ -c ‘ cc@rendc.org‘
rm -rf
whoami
wc
grep string filename
grep string *
grep -r string *
ps
echo $SHELL
./process-name &
, and so on. {xtypo_info}$1, $2 and so on. $0 is your script name.{/xtypo_info} is your script name.
if {condition} then … fi
-eq, -ne, -lt, -le, -gt, -ge
-s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability
! tests for logical not, -a tests for logical and, and -o tests for logical or.
$#
if {condition} then {statement} elif {condition} {statement} fi
for {variable name} in {list} do {statement} done