perl -pe"if($_eq'baz-123'){print'bar=2'}" old_file.txt > new_file.txt [download]
In reply to Re: insert line of text above a line by BUU in thread insert line of text above a line by mabman