Re: shell script error
- From: <m.roth2006@xxxxxxx>
- Date: Thu, 6 Dec 2007 13:12:45 -0500 (EST)
Steven,
Date: Thu, 6 Dec 2007 12:00:08 -0600Yup - it's all inside test brackets, and that's expecting a single argument. You'd have to put it inside backticks. However, a simpler, cleaner version would be:
From: "Steven Buehler" <steve@xxxxxxxxxxxx>
I hope this is the right list to ask this on. I am creating a shell script
for something and the following line (whether run from the script or the
command line) gives me an error:
if [ ! -z /bin/cat /tmp/BACKUP/tmp | /bin/grep 'not accepted' ] ; then echo
hi; else echo no; fi
if [ `grep -c "not accepted" /tmp/BACKUP/tmp` -gt 0 ]; then
echo yep
else
echo nope
fi
mark
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
- Follow-Ups:
- Re: shell script error
- From: Ian Ward Comfort
- Re: shell script error
- Prev by Date: shell script error
- Next by Date: Re: shell script error
- Previous by thread: RE: shell script error
- Next by thread: Re: shell script error
- Index(es):
Relevant Pages
|