News for hackers. Stuff that matters.
Re:Text Processing in the Shell by assafmo on Tuesday March 17, 2020 @02:01PM (#22607965)
Lately I've started to use Perl instead of sed for replacing text. Its regex support is much better IMO:

  cat a.txt | perl -pe 's/banana-(\d)/papaya-$1/g'
Or in-place:

  perl -i -pe 's/banana-(\d)/papaya-$1/g' a.txt

There are no comments on this comment yet.