• 6TM
  • My links
  • Tags
  • pics
  • RSS
  • Login
Filter untagged links

bash - Awk replace string in line - Stack Overflowhttps://stackoverflow.com/questions/39275121/awk-replace-string-in-line

  • awk
  • TIL
  • tip
  • GNU/Linux
  • OPS
  • awk
  • TIL
  • tip
  • GNU/Linux
  • OPS

awk '{sub(/are hello/,"are are")sub(/you hello/,"you you")}1' file

/foo/bar/how /SOME_TEXT_HERE/hello
/foo/bar/are are/SOME_OTHER_TEXT
/foo/bar/you you

Permalink
May 26, 2026 at 7:54:50 PM GMT+2
QRCode
archive.org
Shaarli 96 shaares · Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation · Theme : Stack · Font : DINish
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community