Re: how to check 400 files exist
On 01/19/12 03:04, lina wrote:
[...]
Thanks,
but here it complains so many $ ./check_file.sh
./check_file.sh: line 8: [: too many arguments
Possible problem with spaces. This one works for me:
my_number=400
while :
do
if [ `ls -1 sys_em_*.txt | wc -l` == "$my_number" ]
then
break
fi
echo "test"
sleep 5
done
Cheers,
Wawrzek
--
Wawrzyniec (Wawrzek) Niewodniczański - 01223 435603 (35603) - wawrzekn
System Administrator - Engineering Services Team (XenServer)
Citrix Systems, Building 101, Cambridge Science Park, CB4 0FY, Cambridge
PhD in Quantum Chemistry, MSc in Molecular Engineering
Reply to: