Re: error in script
On Wed, Jan 25, 2006 at 11:48:47PM +0200, roach wrote:
> On Wednesday 25 January 2006 20:10, Jon Miller wrote:
> <...>
> > LOCSAV="/usr/local/sop"
> > if [ -e $(ls -l $LOCSAV/*.ide) ]
> > it comes up with an error, can some lend a hand in fixing this?
>
> Why make it so complicated?
> And what was, the exact, error message?
> What shell are you using?
>
> Try:
>
> if [ -e $LOCSAV/*.ide ]
>
> ... it works here, with bash.
I don't think it will work if you have more than one such file.
if [ `ls $LOCSAV | grep '.ide$'` > 0 ]
might do the trick.
>
> BTW, please set your list mail to text only. Your mailer's sending text, HTML
> and an error message.
>
> Thanks.
> All the best.
>
> --
> Robert "roach" Spencer
> Pietermaritzburg
> South Africa
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
David Jardine
"Running Debian GNU/Linux and
loving every minute of it." -L. von Sacher-M.(1835-1895)
Reply to: