On Thu, 2006-03-16 at 09:05 -0700, Corey Edwards wrote:
> I recommend always putting variables in {} and "". {} prevents your
> variables from being confused with string literals. "" prevents spaces
> from causing problems.

#!/bin/sh
file="/mnt/windows/My Documents/notes.txt"
tensai="Corey"
mesg="The world would be a better place"
mesg="${mesg} if everyone listened to ${tensai}'s advice."
echo "$mesg" >> "$file"
mesg="${mesg/a better/an even better}"
echo "${mesg/Corey/Stuart}" >> "$file"

-- 
Stuart Jansen              e-mail/jabber: [EMAIL PROTECTED]
                           google talk:   [EMAIL PROTECTED]
:0                         # copy & paste for your convenience
* ^From:.*sjansen@
/dev/null                  # /ignore [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to