Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my shell script is"Can't do inplace edit: . is not a regular file."
Ofcourse the above script does the job, getting a bakup file after substitution, but I am getting the above said warning. I tried with -X option to avoid warnings, but no use. It runs at the shell $ prompt or % prompt. But if I run the shell script, I get the above warnings. I did search on inplace edit, but could not get a remedy. I am running on Sun solaris unix.find . -name "*.c" > tomodify.txt if [ -s tomodify.txt ] then cat tomodify.txt | xargs perl -pi.bak -e 's/name1/name2/' $1 fi
Thanks AshokCan you pl. help me?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: inplace edit
by archon (Monk) on Mar 21, 2001 at 05:14 UTC |