I understand that sed is a command to manipulate text file.From my Googling, it seems -i means perform the operation on the file itself, is this correct?What about '1d'?
What does sed -i '1d' do?
sed
In sed:-i option will edit the input file in-place'1d' will remove the first line of the input fileExample:% cat file.txt foobar% sed -i '1d' file.txt % cat file.txt        barNote that, most of the time it's a good idea to take a backup while using the -i option so that you have the original file backup up in case anything goes wrong in the process.For example, if you do:sed -i.orig '1d' file.txt the original file will be kept as file.txt.orig and the modified file will be file.txt.