HI!
I want execute the command:
$cmd="tar -cvvf logswitch.tar `find *.log* -mtime +5` --remove-files";
print $ssh "$cmd\r";
only if
find *.log* -mtime +5
find some files.
Thanks in advance.
Posted on Wed Feb 14 12:38:47 2007
by rgiersigin response to 4328
Re: execute command only if
HI! I want execute the command: $cmd="tar -cvvf logswitch.tar `find *.log* -mtime +5` --remove-files"; print $ssh "$cmd\r"; only if find *.log* -mtime +5 find some files. Thanks in advance.
I would suggest you use the 'if' construct for that...