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" ]; then echo 'da'; fi
> da
> # if [ "`cat ports_sup_log | wc -l`" -nq "3" ]; then echo 'da'; fi
> [:        3: unexpected operator

What do you expect -nq to do?  The equality tests are -eq (equal) and
-ne (not equal).

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to