From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078654411035.tru64-unix-managers.marc@archive.invalid> From: Russell Johnson Date: Sat, 24 Jan 1998 21:15:30 +0000 To: tru64-unix-managers Subject: The grep -c output command? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078654411035 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)( ~~~~)