fredrik.eriksson wrote:
Hum, that should work fine.
Just a few pointers for future references

One thing thou is you're not forced to quote the array variable name, "${array[1]}" is superfluous. ${array[1]} is sufficient.
All the semicolon's you've used are also not needed but this shouldn't pose a problem in your script.
Only place you really need to specify a variable with {} is when you use either something like $typename where $type is the variable name (${type}name) or when you're doing arrays.
As I see it the list is correct. Apperantly the OLD_LIST contains the numbers 3 0 0 0 0 0 and that is what is printed.
If this is not correct then something is wrong when it inputs the value into the array.
What results do you get if you manually run
ls ${MEDWAYPATH}/${list}${LOSTMSGPATH} | egrep Too-old | wc -l?
Edit: ps. use "grep" if you're not going to do regularexpression greps instead of egrep. Egrep is slower by default

ds.
Best regards
Fredrik eriksson
I also thought it should work, thanks for the tips I've removed all of the semicolon's and changed egrep to grep...
I ran the following like you suggested ..
tomehb@tServer:~/Scripts$ ls /usr/medway/GPRSS1/GBP/bin/lost-msg/ | grep Too-old | wc -l
3
tomehb@tServer:~/Scripts$ ls /usr/medway/GPRSS2/GBP/bin/lost-msg/ | grep Too-old | wc -l
0
tomehb@tServer:~/Scripts$ ls /usr/medway/GPRSS3/GBP/bin/lost-msg/ | grep Too-old | wc -l
0
So I'm still confused

Are there any other things i should test? Thanks for your help btw