[6337] in Athena Bugs
vax 7.1H: grep
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Mon Nov 5 03:39:03 1990
Date: Mon, 5 Nov 90 03:38:43 -0500
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: brlewis@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: bugs[6180]
Date: Mon, 08 Oct 90 14:45:38 EDT
From: Bruce R Lewis <brlewis@ATHENA.MIT.EDU>
System name: prep-8
Type and version: CVAXSTAR 7.1H (4 update(s) to same version)
Display type: SM
What were you trying to do?
In a sh script:
if [ `foo | grep -c bar baz` -eq 1 ]; then ...
What's wrong:
grep prints nothing if no matches are found, causing the
error:
test: too many arguments
I cannot duplicate this problem with either /bin/grep or /usr/ucb/grep
on a standard VS3100 running 7.1H. Observe:
gevalt% cat .login | grep -c strings_not_there
0
Can you try to narrow down what, exactly, the problem is?
Jonathan Kamens
Project Athena Quality Assurance