Bug in wc???

Jos Vos jos at xos.nl
Sun Jan 11 16:19:08 UTC 2004


On Sun, Jan 11, 2004 at 05:11:34PM +0100, Hans Müller wrote:

> > > #!/bin/sh
> > > Zeilen= echo `cat /tmp/test.txt |wc -l`
> > > if [ $Zeilen > 3 ]; then
> > > echo "Update";
> > > else
> > > echo "kein Update";
> > > fi
> >
> > Use:
> >
> > Zeilen=`cat /tmp/test.txt |wc -l`
> >
> > And then it will work.
> sorry i will not work.
> i get the message:
> ./test.sh line 2: 4: command not found
> Kein Update

Does this *exact* piece of code not work?


#!/bin/sh
Zeilen=`cat /tmp/test.txt |wc -l`
if [ $Zeilen > 3 ]; then
echo "Update";
else
echo "kein Update";
fi


Sorry to say, but I don't believe that, you seem to have made a
mistake and I'm almost sure you put a blank after the "=" sign,
which means something *completely* different then what I suggested.

-- 
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204





More information about the fedora-list mailing list