> On Sun, Jul 16, 2000 at 11:41:00PM +0300, Shaul Karl wrote:
> > > > 
> > > > [08:40:06 /tmp]# DAEMON=powercom
> > > > [08:41:59 /tmp]# ARGUMENTS='-m "Advice Partner/King PR750" -s 00131581 
> > > > /dev/ttyS1'
> > > > [08:42:09 /tmp]# echo $DAEMON $ARGUMENTS
> > > > powercom -m "Advice Partner/King PR750" -s 00131581 /dev/ttyS1
> 
> > > > [08:42:17 /tmp]# `echo $DAEMON $ARGUMENTS`
> 
> > > > Network UPS Tools - PowerCom UPS driver 0.01 (0.44.0-pre4)
> > > > Unable to open (1) Partner/King: No such file or directory
> > > > [08:42:25 /tmp]# 
> 
> Why not just `$DAEMON $ARGUMENTS` ? This will run $DAEMON with
> $ARGUMENTS as its arguments.
> 
> It's the echo command that is messing things up.
> 
> Check this out:
> 
> I have two directories x and y.
> ls "x y" -> returns an error: ls: x y: no such file or directory
> 
> However:
> ls `echo "x y"` ->returns a listing of directory x and directory y
>                   as if 'ls x y' was written.
> 
> Shell quoting can be difficult sometimes... maybe I'm wrong again.
> 
> --Nimrod.


No, this one is totally wrong. `$DAEMON $ARGUMENTS` gives the output of my 
daemon with its parameters to bash and bash treats the output as a command 
line. There for I am getting

        [01:12:56 /tmp]# `$DAEMON $ARGUMENTS`
        bash: Network: command not found
        [01:13:01 /tmp]# 

And indeed when my daemon is activated properly its output is

        Network UPS Tools - PowerCom UPS driver 0.01 (0.44.0-pre4)

-- 
        
        --  Shaul Karl <[EMAIL PROTECTED]>

        Donate free food to the world's hungry: see http://www.thehungersite.com



=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to