Tech notes on the go
Wednesday, May 7, 2014
EDITING FILES IN PLACE - ED RULES
http://stackoverflow.com/questions/12696125/sed-edit-the-file-in-place
http://wiki.bash-hackers.org/howto/edit-ed
http://www.gnu.org/software/ed/manual/ed_manual.html
echo "g/${MY_COOL_STRING}/d;w" | tr \; '\012' | ed -s ${MY_COOL_FILE}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment