Re: stupid spaces in environment vars

2007-02-09 Thread Andrew DeFaria
Phil Betts wrote: David Bear wrote on Friday, February 09, 2007 4:56 AM:: Okay, the problem is in quoting in shell scripts, I think. It is. It's not a Windows problem and it certainly isn't a cygwin problem. Although spaces occur more often in Windows than on other platforms, they can and do

RE: Re: stupid spaces in environment vars

2007-02-09 Thread Phil Betts
David Bear wrote on Friday, February 09, 2007 4:56 AM:: > Okay, the problem is in quoting in shell scripts, I think. It is. It's not a Windows problem and it certainly isn't a cygwin problem. Although spaces occur more often in Windows than on other platforms, they can and do occur on Unix/Linu

RE: stupid spaces in environment vars

2007-02-09 Thread Williams, Gerald S \(Jerry\)
David Bear wrote: > I would like to have used something like > > cd $USERPROFILE > > in a bash script but since windows insists on putting spaces in > names, this seems impossible. You might be happier writing your scripts in zsh: bash% cd;pwd /home/gsw bash% export SP="silly path" bash% mkd

Re: stupid spaces in environment vars

2007-02-09 Thread Tristen Hayfield
David Bear wrote: Brian Dessent wrote: David Bear wrote: Okay, the problem is in quoting in shell scripts, I think. Here's an example: #!/usr/bin/bash curdir=`pwd` echo $curdir prodir=`cygpath $USERPROFILE` Should be: prodir=$(cygpath "$USERPROFILE") echo $prodir cd $prodir Should be:

Re: stupid spaces in environment vars

2007-02-08 Thread Brian Dessent
David Bear wrote: > >> prodir=`cygpath $USERPROFILE` > > > > Should be: > > > > prodir=$(cygpath "$USERPROFILE") > src=`cygpath $USERPROFILE` Quotes! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation:

Re: stupid spaces in environment vars

2007-02-08 Thread Larry Hall (Cygwin)
Charles D. Russell wrote: Larry Hall (Cygwin) wrote: David Bear wrote: I would like to have used something like cd $USERPROFILE in a bash script but since windows insists on putting spaces in names, this seems impossible. I know this is a consistent issue with cygwin. There reall

Re: stupid spaces in environment vars

2007-02-08 Thread Matt Wozniski
This is not a bug, you're just not listening to what people are telling you. As Brian said, "In general whenever you have a variable that might contain spaces you just need to quote it." SO... On 2/8/07, David Bear wrote: thanks you very much. However, there is still something that doesn't work

Re: stupid spaces in environment vars

2007-02-08 Thread David Bear
Brian Dessent wrote: > David Bear wrote: > >> Okay, the problem is in quoting in shell scripts, I think. >> >> Here's an example: >> #!/usr/bin/bash >> curdir=`pwd` >> echo $curdir >> prodir=`cygpath $USERPROFILE` > > Should be: > > prodir=$(cygpath "$USERPROFILE") > >> echo $prodir >> cd $pr

Re: stupid spaces in environment vars

2007-02-08 Thread Brian Dessent
David Bear wrote: > Okay, the problem is in quoting in shell scripts, I think. > > Here's an example: > #!/usr/bin/bash > curdir=`pwd` > echo $curdir > prodir=`cygpath $USERPROFILE` Should be: prodir=$(cygpath "$USERPROFILE") > echo $prodir > cd $prodir Should be: cd "$prodir" > cd /cygdriv

Re: stupid spaces in environment vars

2007-02-08 Thread David Bear
Larry Hall (Cygwin) wrote: > David Bear wrote: >> I would like to have used something like >> >> cd $USERPROFILE >> >> in a bash script but since windows insists on putting spaces in names, >> this seems impossible. >> >> I did find a usecase where the spaces in c:\Documents and >> Settings\use

RE: Re: stupid spaces in environment vars

2007-02-08 Thread Buchbinder, Barry \(NIH/NIAID\) [E]
Andrew Schulman wrote on Thursday, February 08, 2007 11:36 AM: >> BAD: >> alias cdp=cd\ "$USERPROFILE" >> +alias 'cdp=cd C:\Documents and Settings\me' >> >> alias cdp="cd $USERPROFILE" >> +alias 'cdp=cd C:\Documents and Settings\me' >> >> GOOD: >> alias cdp="cd \"$USERPROFILE\"" >> + alias 'cdp=c

Re: stupid spaces in environment vars

2007-02-08 Thread Charles D. Russell
Charles Russell wrote: OK from the system prompt, but I've never found a way to quote this in a shell script. So I make symlinks to $HOME/my/docs/, my/pics/, my/mus to avoid those infernal microsoft spaces. __ Pardon the idiocy. But the symlinks do simplify things. -- Unsubs

Re: stupid spaces in environment vars

2007-02-08 Thread Andrew DeFaria
How about: $ mount -bsf C:/Documents\ and\ Settings /home ;-) -- Andrew DeFaria I didn't fight my way to the top of the food chain to be a vegetarian. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.ht

Re: stupid spaces in environment vars

2007-02-08 Thread Charles D. Russell
* //Larry Hall (Cygwin) wrote: David Bear wrote: I would like to have used something like cd $USERPROFILE in a bash script but since windows insists on putting spaces in names, this seems impossible. I did fi

Re: stupid spaces in environment vars

2007-02-08 Thread Andrew Schulman
> BAD: > alias cdp=cd\ "$USERPROFILE" > +alias 'cdp=cd C:\Documents and Settings\me' > > alias cdp="cd $USERPROFILE" > +alias 'cdp=cd C:\Documents and Settings\me' > > GOOD: > alias cdp="cd \"$USERPROFILE\"" > + alias 'cdp=cd "C:\Documents and Settings\me"' > > alias cdp='cd "$USERPROFILE"' > +

Re: stupid spaces in environment vars

2007-02-08 Thread Frodak
--- "Larry Hall (Cygwin)" wrote: > David Bear wrote: > > I would like to have used something like > > > > cd $USERPROFILE > > > > in a bash script but since windows insists on > putting spaces in names, this > > seems impossible. > > > > I did find a usecase where the spaces in > c:\Documents

Re: stupid spaces in environment vars

2007-02-07 Thread Larry Hall (Cygwin)
David Bear wrote: I would like to have used something like cd $USERPROFILE in a bash script but since windows insists on putting spaces in names, this seems impossible. I did find a usecase where the spaces in c:\Documents and Settings\username were tripple quoted. However, this did not work f

stupid spaces in environment vars

2007-02-07 Thread David Bear
I would like to have used something like cd $USERPROFILE in a bash script but since windows insists on putting spaces in names, this seems impossible. I did find a usecase where the spaces in c:\Documents and Settings\username were tripple quoted. However, this did not work for me. Bash still wa