Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Joost Bekkers
On Wed, Apr 21, 2004 at 05:09:14PM +0300, Ion-Mihai Tetcu wrote: # if [ `cat ports_sup_log | wc -l` -nq 3 ]; then echo 'da'; fi I think you mean -ne instead of -nq -- greetz Joost [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list

Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Ian D. Leroux
try -ne instead of -nq :-) Ian On Wed, Apr 21, 2004 at 05:09:14PM +0300, Ion-Mihai Tetcu wrote: Hi, Could somebody explain me why in the second case I get an error (both with test(1) and with sh's builtin) ? [EMAIL PROTECTED] /var/log/ports [16:51:38] 0 # sh # cat ports_sup_log | wc

Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Ion-Mihai Tetcu
On Wed, 21 Apr 2004 16:30:44 +0200 Joost Bekkers [EMAIL PROTECTED] wrote: On Wed, Apr 21, 2004 at 05:09:14PM +0300, Ion-Mihai Tetcu wrote: # if [ `cat ports_sup_log | wc -l` -nq 3 ]; then echo 'da'; fi I think you mean -ne instead of -nq Duh, thanks. -- IOnut Unregistered ;) FreeBSD

Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Matthew Seaman
On Wed, Apr 21, 2004 at 05:09:14PM +0300, Ion-Mihai Tetcu wrote: Hi, Could somebody explain me why in the second case I get an error (both with test(1) and with sh's builtin) ? [EMAIL PROTECTED] /var/log/ports [16:51:38] 0 # sh # cat ports_sup_log | wc -l 3 # if [ `cat

Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Dan Nelson
In the last episode (Apr 21), Ion-Mihai Tetcu said: Could somebody explain me why in the second case I get an error (both with test(1) and with sh's builtin) ? [EMAIL PROTECTED] /var/log/ports [16:51:38] 0 # sh # cat ports_sup_log | wc -l 3 # if [ `cat ports_sup_log | wc -l` -eq 3

Re: why test(1) works with -eq but not -nq ?

2004-04-21 Thread Mark Ovens
Ion-Mihai Tetcu wrote: Hi, Could somebody explain me why in the second case I get an error (both with test(1) and with sh's builtin) ? [EMAIL PROTECTED] /var/log/ports [16:51:38] 0 # sh # cat ports_sup_log | wc -l 3 # if [ `cat ports_sup_log | wc -l` -eq 3 ]; then echo 'da'; fi da # if [