Thread

Posted on Tue Feb 13 14:54:03 2007 by domenico
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.
Direct Responses: 4342 | Write a response
Posted on Wed Feb 14 12:38:47 2007 by rgiersig in 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...
Write a response