I have the script which cleans up the the pattern in the file supplied as the argument.
The "file1" that needs clean up and the script lies at the same place.When I pass "file1" as argumenit is echoed well but at the time of the execution of the sed command it gives the following error:
-sh-3.2$ ./temp.pl file1.txt
File provided as the argument : file1.txt
sed: no input files
My script is:
my $logfile = $ARGV[0];
print "File provided as the argument : $logfile \n";
$cmd = q(sed -i '/Job will shutdown./d' $logfile);
$n = system($cmd);