Linux Newbie help
 help / color / mirror / Atom feed
* Variable Quoting
@ 2002-10-14 16:02 Paul Kraus
  2002-10-14 16:32 ` Jim Reimer
  2002-10-14 20:54 ` Don Petrowski
  0 siblings, 2 replies; 13+ messages in thread
From: Paul Kraus @ 2002-10-14 16:02 UTC (permalink / raw)
  To: linux-newbie

I am having trouble quoting with variables. 

For example

source="/backup/My\ Documents/*"
cp ${source} /tmp

When I run this it will see everything up to my and bomb.
Now if I type the exact same path in the exact same way into the code

cp /backup/My\ Documents/*"
It will work fine.

This is not a real world example. I made this up for this email. I am
having this kind of problems with many commands.
Another better example would be...

subj="This is a test email"
mutt -s ${subj} someemailaddress < somemessage

When this is run This becomes the subject and the rest of $subj became
email address. I have also tried escaping the spaces with \ and it does
not work. But when entered directly into the command it works fine.


Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <200210142055.11942.linux-newbie@jimmo.com>]

end of thread, other threads:[~2002-10-16 10:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-14 16:02 Variable Quoting Paul Kraus
2002-10-14 16:32 ` Jim Reimer
2002-10-14 16:38   ` Jim Reimer
2002-10-14 17:59     ` Paul Kraus
2002-10-14 20:54 ` Don Petrowski
     [not found] <200210142055.11942.linux-newbie@jimmo.com>
2002-10-14 18:38 ` Paul Kraus
2002-10-14 19:58   ` James Mohr
2002-10-14 19:53     ` Paul Kraus
2002-10-15 16:13       ` Paul Furness
2002-10-16  7:23         ` ichi
2002-10-16 10:51           ` Paul Furness
2002-10-14 19:55     ` Paul Kraus
2002-10-14 21:00       ` James Mohr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox