i have the below code to replace some strigns in multiple files, but the for loop is checking for the first file and not executing the perl script. below is my code
if [ -f zebu.work.post_opt/ZEBU_CTO_FT_MOD.v ]
then
for file in $(./zebu.work.post_opt/ZEBU_CTO_FT_MOD*);
do
perl -i -p -e 's/input/inout/g' $file;
perl -i -p -e 's/output/inout/g' $file;
perl -i -p -e 's/wire.*\n/tran\(i0,\ o\);/g' $file;
perl -i -p -e 's/assign.*\n//g' $file;
done
fi
$(...)
around your filename globbing pattern. You don't need a command substitution there. You may also combine the four Perl invocations to a single one for speed.