TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Shell patterns for easy automated code migrations

2 pointsby gcmeplzalmost 3 years ago

1 comment

gigatexalalmost 3 years ago
Did not know this:<p>“ use | (or anything else!) as your delimiter rather than &#x2F;. sed takes the first character after the command as the delimiter, and &#x2F; will show up in things that you want to replace pretty often! Writing gsed &#x27;s|&#x2F;path&#x2F;file.js|&#x2F;path&#x2F;file.ts|&#x27; is nicer than gsed &#x27;s&#x2F;\&#x2F;path\&#x2F;file.js&#x2F;\&#x2F;path\&#x2F;file.ts&#x2F;&#x27;.”<p>Thank you!!!