Re: how to check 400 files exist

2012-01-23 Thread Wawrzek Niewodniczanski
On 01/19/12 15:07, Jon Dowland wrote: On 19/01/12 12:25, Wawrzek Niewodniczanski wrote: So theoretical your comment is right, but I doubt that max argument limit is the reason of problem in this case. Well, read the error message again: ./check_file.sh: line 8: [: too many arguments The

Re: how to check 400 files exist

2012-01-20 Thread Karl Vogel
On Thu, 19 Jan 2012 00:34:50 +0800, lina lina.lastn...@gmail.com said: L I am choked by how to check more than 400 files exist or not, if not, L sleep, but once it's all generated, continue do something. Those files L have a common feature: sys_em_$i.txt The script below doesn't do any

Re: how to check 400 files exist

2012-01-20 Thread lina
On Sat, Jan 21, 2012 at 4:02 AM, Karl Vogel vogelke+deb...@pobox.com wrote: On Thu, 19 Jan 2012 00:34:50 +0800, lina lina.lastn...@gmail.com said: L I am choked by how to check more than 400 files exist or not, if not, L sleep, but once it's all generated, continue do something.  Those files

Re: how to check 400 files exist

2012-01-20 Thread lina
On Thu, Jan 19, 2012 at 8:17 PM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com wrote: On 01/19/12 11:45, Jon Dowland wrote: On 19/01/12 11:29, Wawrzek Niewodniczanski wrote: On 01/19/12 03:04, lina wrote: [...] Thanks, but here it complains so many $ ./check_file.sh

Re: how to check 400 files exist

2012-01-19 Thread Balint Szigeti
On 19/01/2012 03:04, lina wrote: On Thu, Jan 19, 2012 at 1:35 AM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com wrote: On 01/18/12 16:34, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once

Re: how to check 400 files exist

2012-01-19 Thread Balint Szigeti
On 19/01/2012 03:04, lina wrote: On Thu, Jan 19, 2012 at 1:35 AM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com wrote: On 01/18/12 16:34, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once

Re: how to check 400 files exist

2012-01-19 Thread Balint Szigeti
On 19/01/2012 04:51, Anand Sivaram wrote: 2012/1/19 lina lina.lastn...@gmail.com mailto:lina.lastn...@gmail.com On Thu, Jan 19, 2012 at 1:35 AM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com mailto:wawrzek.niewodniczan...@citrix.com wrote: On 01/18/12 16:34, lina

Re: how to check 400 files exist

2012-01-19 Thread Wawrzek Niewodniczanski
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

Re: how to check 400 files exist

2012-01-19 Thread Jon Dowland
On 19/01/12 08:33, Balint Szigeti wrote: run this ls|xargs wc -l Never parse the output of ls(1) http://mywiki.wooledge.org/ParsingLs -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive:

Re: how to check 400 files exist

2012-01-19 Thread Jon Dowland
On 19/01/12 11:29, Wawrzek Niewodniczanski wrote: 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: No, the problem is the number of arguments to

Re: how to check 400 files exist

2012-01-19 Thread Wawrzek Niewodniczanski
On 01/19/12 11:45, Jon Dowland wrote: On 19/01/12 11:29, Wawrzek Niewodniczanski wrote: 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: No, the

Re: how to check 400 files exist

2012-01-19 Thread Wawrzek Niewodniczanski
On 01/19/12 12:17, Wawrzek Niewodniczanski wrote: On 01/19/12 11:45, Jon Dowland wrote: On 19/01/12 11:29, Wawrzek Niewodniczanski wrote: 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

Re: how to check 400 files exist

2012-01-19 Thread Jon Dowland
On 19/01/12 12:25, Wawrzek Niewodniczanski wrote: So theoretical your comment is right, but I doubt that max argument limit is the reason of problem in this case. Well, read the error message again: ./check_file.sh: line 8: [: too many arguments The test binary, aka '[', has received too

Re: how to check 400 files exist

2012-01-19 Thread Sebastian Steinhuber
Am 19.01.2012 04:04, schrieb lina: … if [ ` ls -1 sys_em_*.txt | wc -l` == $my_number ] then Syntax: ';' missing before then? if [ ` ls -1 sys_em_*.txt | wc -l` == $my_number ]; then Cheers -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of

Re: how to check 400 files exist

2012-01-19 Thread keitho
On 19/01/12 08:33, Balint Szigeti wrote: run this ls|xargs wc -l Never parse the output of ls(1) http://mywiki.wooledge.org/ParsingLs WOW, that link to Greg's (also known as GreyCat's) wiki is awesome! Thanks! Keith Ostertag -- To UNSUBSCRIBE, email to

Re: Fwd: how to check 400 files exist

2012-01-19 Thread Darac Marjal
: how to check 400 files exist On 19 Jan, 2012, at 1:09, Darac Marjal [3]mailingl...@darac.org.uk wrote: The problem you have here is that you don't know when a file isn't there. Try: Missing=0 for i in $(seq 5); do  if [ ! -e sys_em_$i.txt

how to check 400 files exist

2012-01-18 Thread lina
Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once it's all generated, continue do something. for i in $(seq 5); do if [ -e sys_em_$i.txt ] ; then echo done ; fi ; done not work. those files have a common feature:

Re: how to check 400 files exist

2012-01-18 Thread Darac Marjal
On Thu, Jan 19, 2012 at 12:34:50AM +0800, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once it's all generated, continue do something. for i in $(seq 5); do if [ -e sys_em_$i.txt ] ; then echo done

Fwd: how to check 400 files exist

2012-01-18 Thread lina
Sorry to send to Darac, here forwards to list. Begin forwarded message: From: lina lina.lastn...@gmail.com Date: 19 January, 2012 1:29:14 GMT+08:00 To: Darac Marjal mailingl...@darac.org.uk Subject: Re: how to check 400 files exist On 19 Jan, 2012, at 1:09, Darac Marjal mailingl

Re: how to check 400 files exist

2012-01-18 Thread Wawrzek Niewodniczanski
On 01/18/12 16:34, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once it's all generated, continue do something. for i in $(seq 5); do if [ -e sys_em_$i.txt ] ; then echo done ; fi ; done not work. those

Re: how to check 400 files exist

2012-01-18 Thread lina
On Thu, Jan 19, 2012 at 1:35 AM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com wrote: On 01/18/12 16:34, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not, sleep, but once it's all generated, continue do

Re: how to check 400 files exist

2012-01-18 Thread Anand Sivaram
2012/1/19 lina lina.lastn...@gmail.com On Thu, Jan 19, 2012 at 1:35 AM, Wawrzek Niewodniczanski wawrzek.niewodniczan...@citrix.com wrote: On 01/18/12 16:34, lina wrote: Hi, Thanks ahead for reading this email. I am choked by how to check more than 400 files exist or not, if not,