1. To redirect the output of a bash command into a file, > is used followed by the file name. It creates a new file or overwrites the existing one. To append, use >> this operator.
For example: ls –l > list.txt will store the list of files of that directory to the list.txt file.
2. Operator | means pipe in bash. It is used to set the output of first command as the input of the next command.
For example: ls | grep ".txt" will show all the files of current directory which have .txt in them.
3. In gawk, $0 contains the whole line of input arguments.
4. In bash script, $0 contains the name of the script file that is being executed currently.
5. esac statement in the bash script is used to end the case block just like the fi is used to end if.
Get Answers For Free
Most questions answered within 1 hours.