BASH while [ ls "$1/tmp/" | wc -l -ge 3 ]; problem

dave selby dave6502 at googlemail.com
Fri Nov 9 20:50:31 UTC 2007


Hi all,

Stuck on bash, I need to execute a while loop while there are >= 3
items in a dir. I tried

while [ ls "$1/tmp/" | wc -l -ge 3 ];

and I get ./kmotion_hkd.sh: line 33: [: missing `]'

any idea what I am missing ?

Cheers

Dave




-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html




More information about the ubuntu-users mailing list