HP3000-L Archives

January 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"COLE,GLENN (Non-HP-SantaClara,ex2)" <[log in to unmask]>
Reply To:
COLE,GLENN (Non-HP-SantaClara,ex2)
Date:
Fri, 26 Jan 2001 17:10:17 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
"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

ATOM RSS1 RSS2