Hacker News new | ask | show | jobs
Shell patterns for easy automated code migrations (will-keleher.com)
2 points by gcmeplz 1484 days ago
1 comments

Did not know this:

“ use | (or anything else!) as your delimiter rather than /. sed takes the first character after the command as the delimiter, and / will show up in things that you want to replace pretty often! Writing gsed 's|/path/file.js|/path/file.ts|' is nicer than gsed 's/\/path\/file.js/\/path\/file.ts/'.”

Thank you!!!