bug-bash
[Top][All Lists]
Advanced

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

Re: Exporting variables containing white space


From: Paul Jarc
Subject: Re: Exporting variables containing white space
Date: Mon, 17 Jun 2002 15:05:13 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

Raphael Summers <raphael@cs.man.ac.uk> wrote:
> export MYMUSIC=/mnt/windows/Documents\ and\ Settings/Administrator/My\ 
> Documents/My\ Music
>
> On attempting to cd to $MYMUSIC, it complains that there does not
> exist a directory /mnt/windows/Documents\

Since the variable's value contains whitespace, you must quote the
variable expansion to avoid word splitting:
cd "$MYMUSIC"


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]