November 2015
Beginner
282 pages
5h 5m
English
So far, we have seen the usage of the commands such as grep, head, ls, cat, and many more. These commands also support passing arguments to a command via a command line. Some of command line arguments are input files, output files, and options. Arguments are provided as per output needs. For example, ls -l filename is executed to get a long listing output, while ls -R filename is used to display recursively the contents of a directory.
Shell script also supports providing command line arguments that we can process further by a shell script.
The command line arguments can be given as follows:
<script_file> arg1 arg2 arg3 … argN
Here, script_file is a shell script file to be executed, and arg1, arg2, arg3 ...