* Sean Rima <sean@tcob1.net> [11-30-03 10:34]:
Vic Ayres writes:
Sean Rima wrote:
I am trying to test to see if a file exsides but the extension changes all the time, ie
ab251455.001 ab251455.002
if I do a : if [ -e /var/max/spool/inbound/ab251455.* ] ; then run_command fi
the run_command never runs
That's strange. I tried with #!/bin/bash if [ -e ab123.* ] ; then echo "It exists" fi and it works perfectly. Is run_command in the path?
It is, but I noticed that you didn't include a path, maybe that is why mine is failing, will experiment.
Then you will have to start the script in the directory that the subject file resides. Have you checked to see if you have read/write access (permission) for the directory where ab251455.00? resides? You might also substitute 'echo "It exists"' for 'run_command' to try to isolate the problem to 'run_command' or '[ -e .... ]'. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org