[Top][All Lists]

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

Re: Exporting variables containing white space

From: Chris F.A. Johnson
Subject: Re: Exporting variables containing white space
Date: 24 Jun 2002 04:32:44 GMT
User-agent: slrn/ (Linux)

In article <address@hidden>, Paul Jarc wrote:
> Raphael Summers <address@hidden> 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"

        shopt -s cdable_vars
        cd MYMUSIC

        Chris F.A. Johnson                              address@hidden
        address@hidden                http://cfaj.freeshell.org
        address@hidden        http://members.rogers.com/c.f.a.johnson

reply via email to

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