Let us take a sample file with the following contents:
$ cat file 3 4 5
$ cat file1 24 12 34 45
$ echo $x 3Now, say we want to add every value with the shell variable x.
$ cat file Badri Mainframes Suresh Unix Rajendar Clist Sreedhar Filenet
$ cat file Satya MainframesManoj Unix Manish WindowsAs shown above, all the records are in the same line.
$ cat file1 welcome
$ cat file1 Rakesh,Father,35,Manager Niti,Mother,30,Group Lead Shlok,Son,5,StudentThe first column indicates name, second relationship, the third being the age, and the last one is their profession.
$ cat file1 1apple 1banana 1mango
$ cat file2 2orange 2strawberrysed has 2 options for reading and writing:
$ cat file1 apple orange grapes banana
$ cat -v file1 a^M b^M c^M d^M e^M f^M
apple orange banana pappaya
Hilesh, 1001 Bharti, 1002 Aparna, 1003 Harshal, 1004 Keyur, 1005
$# - Total number of arguments $0 - Command or the script name $1,$2, $3 - First, second and third args respectively. $* - All the command line arguments starting from $1.