Quote:
Originally Posted by SBN
What does the code do?
|
It does exactly what it says it does!!! Seriously, what part do you not understand?
In addition to the documentation already suggested, my favorite SED tutorial is here:
http://www.grymoire.com/Unix/Sed.html
The thing that might be hard to see is the use of a "backreference". Here is a generic example:
sed 's/stuff\(keepthis\)morestuff/ newstuff\1/'
The output of this will be: "keepthis newstuff". Anything between the escaped parentheses ("\(\)") is inserted where the "\1" appears.