Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Shell patterns for easy automated code migrations (will-keleher.com)
2 points by gcmeplz on May 25, 2022 | hide | past | favorite | 1 comment


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!!!




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: