Skip to main content
Post Undeleted by Joseph R.
deleted 18 characters in body
Source Link
Joseph R.
  • 40.6k
  • 8
  • 115
  • 146

Here's a "magic"A Perl one-liner for the job:alternative

perl -pne -e'print;print 'sif s/EUR\Z/AUD/ and print'' your_file

If you want to make the modifications to the file in place, just add the -i switch:

perl -pini -e 's'print;print if s/EUR\Z/AUD/ and print'' your_file

Here's a "magic" Perl one-liner for the job:

perl -p -e 's/EUR\Z/AUD/ and print' your_file

If you want to make the modifications to the file in place, just add the -i switch:

perl -pi -e 's/EUR\Z/AUD/ and print' your_file

A Perl alternative

perl -ne 'print;print if s/EUR\Z/AUD/' your_file

If you want to make the modifications to the file in place, just add the -i switch:

perl -ni -e 'print;print if s/EUR\Z/AUD/' your_file
Post Deleted by Joseph R.
Source Link
Joseph R.
  • 40.6k
  • 8
  • 115
  • 146

Here's a "magic" Perl one-liner for the job:

perl -p -e 's/EUR\Z/AUD/ and print' your_file

If you want to make the modifications to the file in place, just add the -i switch:

perl -pi -e 's/EUR\Z/AUD/ and print' your_file