top | item 22607965

(no title)

assafmo | 6 years ago

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

discuss

order

No comments yet.