Posted on 2007-02-13 12:54:03-08 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 2007-02-14 10:38:47-08 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...
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.