BASH script quote problem

Alex Esplin alex.esplin at gmail.com
Fri Nov 3 07:10:40 MST 2006


On 11/2/06, Michael A. Cleverly <michael at cleverly.com> wrote:
> Or even:
>
> ls | mail -s "Running on $HOSTNAME - sent" $RECIP
>
> since $HOSTNAME is a bash built-in variable.

That might not give quite the results the OP wanted, since $HOSTNAME
returns the name of the host and not the OS running on said host.

For example, on a Linux box here at work,

"Running on $HOSTNAME" reads as: "Running on frogger", where as

"Running on `uname -o`" reads as: "Running on GNU/Linux"

Just my $.02 based on the statements in the original post.

-- 
Alex Esplin



More information about the PLUG mailing list