Hi,
I have a file and i have to insert a line above a particular line in the file.
In the file the lines starts with dates and can have lines starting with repeated dates. I want to search(first occurence) for a line starting with particular date and insert a line above that line
Ex
sample.txt
-------------------------------
013008 .......
013008 .......
013108 .......
013108 .......
013008 .......
020108
020108 ........
Say i want to search for a line starting with 020108(first occurence ) and insert a line above it. Can you please give me the
sed command for that
or
perl onliner.
Thanks in advance
ammuu