So i pass a string to another function, which is read by SED. I have to use line numbers due to duplicate text entries in the text file im editing. In the sed line, im saying edit the first line.Substitue anything in that line with the word test. The second test (commented out) does a reverse video to highlight that text. Can anyone give me pointers as to how i can write the above in perl.#!/usr/bin/ksh test1() { eval sed -e $1 testfile > testfile2 } test1 "'1s/.*/test /'" #test1 "'1s/.*/ '$(tput smso)'broken'$(tput rmso)' /'"
In reply to Convert from Sed to Perl by mc007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |