This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:commands:sed [2019/01/01 15:07] dave |
linux:commands:sed [2019/01/01 15:16] (current) dave old revision restored (2018/08/15 17:44) |
||
---|---|---|---|
Line 2: | Line 2: | ||
''sed'' is a text processing thingy that is very sophisticated. | ''sed'' is a text processing thingy that is very sophisticated. | ||
- | ''sed'' can be used to search and replace across files: | + | [[https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files/112024#112024|Here]] is a useful stackexchange thread that shows how to use ''sed'' to perform a "search an replace" across groups of files. |
- | + | ||
- | [[https://stackoverflow.com/questions/11392478/how-to-replace-a-string-in-multiple-files-in-linux-command-line|From]]: | + | |
- | <code> | + | |
- | cd /path/to/your/folder | + | |
- | sed -i 's/foo/bar/g' * | + | |
- | </code> | + | |
- | + |