[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use apostrophe in bash shell script?



Kent West said:
> I'm trying to use the following in a bash shell script:
>
> echo This machine's name and IP address
> cat /etc/hosts | grep $HOSTNAME

try enclosing the line in quotes:

echo "This machine's IP address"

seems to work for me

nate






Reply to: