in reply to ho w to replace a occurence of string by other string
perl -pi.bak -e'BEGIN{$testname="whatever"} s!([^/]+\.data)\b!$testname/$1!g' output.txt That will make the substitutions into output.txt which is backed up in a file called output.txt.bak.
[Update: edited for thinko, VSarkiss++]
After Compline,
Zaxo
|
|---|