From: Russell Johnson <rkj () loyno ! edu>
To: tru64-unix-managers
Subject: The grep -c output command?
Date: Sat, 24 Jan 1998 21:15:30 +0000 [thread overview]
Message-ID: <96078654411035.tru64-unix-managers.marc@archive.invalid> (raw)
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)( ~~~~)
reply other threads:[~1998-01-24 21:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox