Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 7137

Summary: grep -cl for number of processors in /etc/rc.d/rc.local
Product: [Retired] Red Hat Linux Reporter: Hans Ginzel <hans>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-11-19 15:41:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Hans Ginzel 1999-11-19 11:18:09 UTC
There is
              NUMPROC=`grep -cl "^cpu[0-9]+" /proc/stat`
in /etc/rc.d/rc.local,
but manual page of grep says:
     -l, --files-with-matches
              Suppress  normal  output; instead print the name of
              each input file from which  output  would  normally
              have  been  printed.  The scanning will stop on the
              first match.

So it will stop on the first ^cpu line and print also the filename
Why is there -l?

initscripts 4.48
grep (GNU grep) 2.3

Comment 1 Bill Nottingham 1999-11-19 15:41:59 UTC
This is fixed in the errata initscripts release. :)