tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* The grep -c output command?
@ 1998-01-24 21:15 Russell Johnson
  0 siblings, 0 replies; only message in thread
From: Russell Johnson @ 1998-01-24 21:15 UTC (permalink / raw)
  To: tru64-unix-managers

Gurus,
Is there anyway to make an if statement with grep -c
so if 0  will print to a file?
for username in `cat /home/root/alist `
do
 if [ grep -c -E $username /home/root/reallist ]
 then
 echo $username >> try.1
 fi
done
thanks,
 
                                 \\\\|////
                                  ! ^ ^ !
                    \\\|///       ( O O )
                  \\  - -  //      ( | )
                   (  @  @  )       (o)
+-----------------oOOo-(_)-oOOo---oOOo---oOOo--------+
| Russell Johnson                  Loyola University |
| rkj@loyno.edu                    of New Orleans    |
| tel:504.865.2792                 fax:504.865.2875  |
+-------------------------Oooo-----------------------+
                   oooO   (   )  [    }  \ 
                  (   )    ) /   [   |    | 
                   \ (    (_/    [   |    |
                    \_)          [   |   / 
                                 oooO)( ~~~~)
                                            

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-01-24 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-24 21:15 The grep -c output command? Russell Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox