Hi
I have this below script...I want to execute the shell command "rm" in the below script
but it is not working. Can anybody why so?
I got the below error
rm: /users/amvarma is a directory
sh: /*-log*: not found
-------------------
$u=`whoami`;
print "$u\n";
$op_1=$ARGV[0]; # for platform , c3750,c356..etc
$op_2=$ARGV[1]; # for crypto
$op_3=$ARGV[2]; # for build option production or devonly
lc($op_1);
lc($op_2);
lc($op_3);
chomp($options);
print "option-1= $op_1\n";
print "option-2= $op_2\n";
print "option-3= $op_3\n";
$s="*-log*";
if ( $op_1 eq "all" )
{
print "clearing old buildlogs in /users/$u & images in /tftpboot/$u to
avoid failure due to space\n";
system\("rm -f /users/$u/$s"\);
\#system\("rm -f /tftpboot/$u/\*.*"\);
print "clearing ...done\\n"
}
Thx
Amit