gibney.org
:
Technology
:
Programming
:
sed
(Entry Nr. 81, by user 1 |
edit
)
Replace the first instance of foo with bar:<br><span class=span_content_bash>sed 's/foo/bar/'</span><br><br>Replace the fourth instance of foo with bar:<br><span class=span_content_bash>sed 's/foo/bar/4'</span><br><br>Replace all instances of foo with bar:<br><span class=span_content_bash>sed 's/foo/bar/g'</span><br><br>Get all mounted folders:<br><span class=span_content_bash>mount | sed s/.*on\ // | sed s/\ type.*//</span><br>
Convert Filenames with sed
convert ä,ü,ö to ae,ue,oe
Replace a string in multiple files
Create a new entry at this position