Unix helpers

From Blue-IT.org Wiki

Revision as of 15:52, 20 February 2012 by Apos (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

sed

Mostly perfect:

Add a line into a given script

sed -i '/"Text in the line before"/s@"Text in the line before"@&\n\tNEW_TEXT_IN_LINES_AFTER@' \
/etc/yourscript