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


--
To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to