Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is quite nice what `sed` does. A sed search-and-replace is typically shown as `s/foo/bar/`, but you can actually use any punctuation character to separate the parts. Whatever follows the "s" will be used for that statement, so you can write `s|foo|bar|` or `s:foo:bar:`, even mixing and matching in the same script to have `s|baz|quux|; s:xyzzy:blorp:` and it will all work.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: