James' blog
Programming and System Administration
Friday, May 29, 2009
Insert text before a pattern with sed
cat some_file | sed '/pattern/i\
text to insert
' > output_file
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment