SHELL Script to insert a line.
I am using the Korn shell and I wanted to write a SHELL script for the following requirement.
1. Delete the first line and last line of the input file.
2. Insert a line at the first and last line position of the file.
I am able to delete the first line with the following command.
SED '1d' Testfile.xml
But I dont know how to get the last line number and delete it.
Even I am not aware of which command to be used to insert a line at the first and last line position.
Any help is appreciated...!!!!