Subject: | |
From: | |
Reply To: | COLE,GLENN (Non-HP-SantaClara,ex2) |
Date: | Fri, 26 Jan 2001 17:10:17 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
"Simonsen, Larry" wrote:
>
> I tried this and received the error
> :xeq sh.hpbin.sys "-c 'kill 'head -n 1 /SENDMAIL/PUB/etc/sendmail.pid''"
> **** AMBIGUOUS USE OF QUOTES WITHIN INFO STRING (CERR 13)
then Mark Bixby:
>You used the wrong quotes around the head statement. Look closely below,
and
>you'll see that these are backtics:
>
>> :xeq sh.hpbin.sys "-c 'kill `head -n 1 /SENDMAIL/PUB/etc/sendmail.pid`'"
It may help to understand what backtics do.
Basically, `expression` says to execute the expression, then substitute
the result. Thus,
kill `head -n 1 /SENDMAIL/PUB/etc/sendmail.pid`
says to read the first line (head -n 1, which normally I see as head -1)
of /SENDMAIL/PUB/etc/sendmail.pid, and use the result (i.e., the first
line of the file) as a parameter to kill.
Obscure syntax, but handy functionality.
--Glenn
|
|
|