[Lunar-bugs] [Lunar Linux 0000464]: use grep -q instead of grep -s
Lunar bug reports list
lunar-bugs at lunar-linux.org
Thu Mar 17 21:38:18 CET 2011
The following issue has been ASSIGNED.
======================================================================
http://bugs.lunar-linux.org/view.php?id=464
======================================================================
Reported By: brebs
Assigned To: ratler
======================================================================
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-17 21:38 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).
----------------------------------------------------------------------
(0001069) brebs (developer) - 2011-03-16 14:45
http://bugs.lunar-linux.org/view.php?id=464#c1069
----------------------------------------------------------------------
It only concerns this one line. Redirection is not needed, because the file
being checked is /etc/ld.so.conf, which always exists AFAIK. Anyway, I've
had no other problems :)
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
2011-03-16 14:45 brebs Note Added: 0001069
2011-03-17 21:38 ratler Assigned To sofar => ratler
======================================================================
More information about the Lunar-bugs
mailing list