[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Which tool, and how, to get partial string from file?



Kent West wrote:

Kent West wrote:


My test script:

#!/bin/bash

if [ `grep -q icewm /home.local/snert/.xinitrc` ] ; then
        echo "Yep"
else
        echo "Nope"
fi



and the result:

snert[@macs51]:/home.local/snert> ./test.sh
Nope



But removing the "-q" seems to do the trick.

Thanks!


Oops; I thought it worked. But it doesn't. At least not reliably. I would have thought that this would be a common enough need that there'd be a common solution for it, but after half a day of googling, and asking on this list, still no answer is forthcoming. I'm stunned.

--
Kent




Reply to: