I am looking to insert a line of text in a file after a specific line. I know how to do it based on the line number:
#perl -pi -le 'print "New line Insertion" if $. == 100' file.txt
How would i adjust the example above for inserting "New Line Insertion" on the line after my search pattern?
Any help with this would be greatly appreciated.
Mike
#perl -pi -le 'print "New line Insertion" if $. == 100' file.txt
How would i adjust the example above for inserting "New Line Insertion" on the line after my search pattern?
Any help with this would be greatly appreciated.
Mike