-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, 30 Nov 2003 15:23:28 +0000
Vic Ayres
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? You might be a bit better off using the for command. #!/bin/bash if [ -e /var/max/spool/inbound/ab251455.* ] ; then LIST=$(ls /var/max/spool/inbound/ab251455.*) for i in $LIST do runcommand $i done fi
This will allow you to issue your command on the individual file.
- --
Jerry Feldman