[Lunar-bugs] [Lunar Linux 0000464]: use grep -q instead of grep -s
Lunar bug reports list
lunar-bugs at lunar-linux.org
Tue Mar 1 13:00:52 CET 2011
A NOTE has been added to this issue.
======================================================================
http://bugs.lunar-linux.org/view.php?id=464
======================================================================
Reported By: brebs
Assigned To: sofar
======================================================================
Project: Lunar Linux
Issue ID: 464
Category: lunar
Reproducibility: always
Severity: tweak
Priority: normal
Status: assigned
lvu installed moonbase: 20110301.06
Core Tools: Lunar
lvu installed [lunar|theedge]: 20100324
======================================================================
Date Submitted: 2011-03-01 11:55 CET
Last Modified: 2011-03-01 13:00 CET
======================================================================
Summary: use grep -q instead of grep -s
Description:
With bash 4.2 patchlevel 5, lin xproto gives error:
/var/lib/lunar/functions/misc.lunar: line 35: [: /usr/lib: unary operator
expected
The fix is to change the s to a q on line 35 (in "grep -s").
======================================================================
----------------------------------------------------------------------
(0001066) wookietreiber (reporter) - 2011-03-01 13:00
http://bugs.lunar-linux.org/view.php?id=464#c1066
----------------------------------------------------------------------
reading man grep:
-q, --quiet, --silent
Quiet; do not write anything to standard output. Exit
immediately with zero status if any match is found, even if an error
was
detected. Also see the -s or --no-messages option. (-q is
specified by POSIX.)
-s, --no-messages
Suppress error messages about nonexistent or unreadable
files. Portability note: unlike GNU grep, 7th Edition Unix grep did not
conform to POSIX, because it lacked -q and its -s option
behaved like GNU grep's -q option. USG-style grep also lacked -q but its
-s option behaved like GNU grep. Portable shell scripts
should avoid both -q and -s and should redirect standard and error output
to /dev/null instead. (-s is specified by POSIX.)
we should propably avoid -q and -s and use redirection instead and change
all occurrences of grep -s and grep -q wherever they are (I guess it
concerns more than just misc.lunar).
Issue History
Date Modified Username Field Change
======================================================================
2011-03-01 11:55 brebs New Issue
2011-03-01 11:55 brebs Status new => assigned
2011-03-01 11:55 brebs Assigned To => sofar
2011-03-01 11:55 brebs lvu installed moonbase => 20110301.06
2011-03-01 11:55 brebs Core Tools => Lunar
2011-03-01 11:55 brebs lvu installed [lunar|theedge] => 20100324
2011-03-01 13:00 wookietreiber Note Added: 0001066
======================================================================
More information about the Lunar-bugs
mailing list