Sample File1:
Let us consider a sample file with the following contents:
$ cat file1 Item1,200 Item2,500 Item3,900 Item2,800 Item1,600
$ cat file1 Item1,200 Item2,500 Item3,900 Item2,800 Item1,600
$ cat file Cygwin Unix Linux Solaris AIX1. Delete the 1st line or the header line:
$ sed '1d' file Unix Linux Solaris AIXd command is to delete a line. 1d means to delete the first line.
$ cat file Linux Solaris Fedora Ubuntu AIX HPUXInserting before the pattern:
$ cat file Linux Solaris AIX Ubuntu Fedora
$ cat file Linux Solaris AIX1. tac command is the reverse of cat. It simply prints the file in reverse order.
$ tac file AIX Solaris LinuxNote: tac is not available in all Unix flavors.
$ cat file Item1,200 Item2,500 Item3,900 Item2,800 Item1,600