Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
Never mind... I didn't read far enough down my inbox to see the SOLVED section of the thread. On Thu, 5 Jun 2014, Paul Heinlein wrote: On Wed, 4 Jun 2014, James B. Byrne wrote: On Tue, June 3, 2014 13:03, Paul Heinlein wrote: > Try > > cd "${HOME}/Library/Application Support/" > hll-m22:~ byrnejb$ cd "${HOME}/Library/Application Support/" -bash: cd: /Users/byrnejb/Library/Application: No such file or directory It looks to me like your quotes are getting lost somehow. I was able to use that very snippet on every Mac to which I have access. Obviously, $HOME was expanded correctly, so that's not a problem, but there's something really odd about the double-quotes not being honored. You might try the C-escape syntax (note prefixed $): cd $'/Users/byrnejb/Library/Application Support' Which $SHELL are you using? Does your shell rc file have any funky options set like rcquotes or nonstandard $IFS? -- Paul Heinlein heinl...@madboa.com 45°38' N, 122°6' W___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Wed, 4 Jun 2014, James B. Byrne wrote: On Tue, June 3, 2014 13:03, Paul Heinlein wrote: Try cd "${HOME}/Library/Application Support/" hll-m22:~ byrnejb$ cd "${HOME}/Library/Application Support/" -bash: cd: /Users/byrnejb/Library/Application: No such file or directory It looks to me like your quotes are getting lost somehow. I was able to use that very snippet on every Mac to which I have access. Obviously, $HOME was expanded correctly, so that's not a problem, but there's something really odd about the double-quotes not being honored. You might try the C-escape syntax (note prefixed $): cd $'/Users/byrnejb/Library/Application Support' Which $SHELL are you using? Does your shell rc file have any funky options set like rcquotes or nonstandard $IFS? -- Paul Heinlein heinl...@madboa.com 45°38' N, 122°6' W___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On 2014-06-04 21:37, Stephen Harris wrote: > On Wed, Jun 04, 2014 at 02:42:23PM -0400, James B. Byrne wrote: >> On Tue, June 3, 2014 12:37, Stephen Harris wrote: >>> The OP likely has a function called "cd" which does other stuff (sets > >> hll-m22:~ byrnejb$ alias > > A function is not an alias. > In other words, what's the output of declare -f | sed -n -e '/^cd /,/^}/ p' ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Wed, 4 Jun 2014 14:42:23 -0400 "James B. Byrne" wrote: > On Tue, June 3, 2014 12:37, Stephen Harris wrote: > > The OP likely has a function called "cd" which does other stuff (sets > > the prompt?) and then calls the builtin cd, but its not quoting the > > variables properly and so breaking. > > > hll-m22:~ byrnejb$ alias > alias ..='cd ..' > alias ...='cd ../..' > alias copy='cp -i' > alias cp='cp -i' > alias etl='~/projects/proforma.git/vendor/plugins/activewarehouse-etl/bin/etl' > alias la='ls -la' > alias ll='ls -l' > alias mate='gvim -c NERDTree' > alias mc='mc -c' > alias mcd='mount /mnt/cdrom' > alias rm='rm -i' > alias search='grep' > alias ucd='umount /mnt/cdrom' > $ unalias cd > -bash: unalias: cd: not found > Try with backslash: \cd ... BR, Bob ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
James B. Byrne wrote: > > On Tue, June 3, 2014 12:13, SilverTip257 wrote: >> Escape the space with a backslash. >> cd ~/Library/Application\ Support >> > hll-m22:~ byrnejb$ cd ~/Library/Application\ Support > -bash: cd: /Users/byrnejb/Library/Application: No such file or directory > hll-m22:~ byrnejb$ cd ~/"Library/Application\ Support" > -bash: cd: /Users/byrnejb/Library/Application\: No such file or directory > Really dumb question: what happens when you cd /Users/byrnejb/Library ? Once there, what's ls -laF show? Btw, I would only have quoted the directory with the space in it: ~/Library/"Application Support" mark ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Wed, Jun 04, 2014 at 02:42:23PM -0400, James B. Byrne wrote: > On Tue, June 3, 2014 12:37, Stephen Harris wrote: > > The OP likely has a function called "cd" which does other stuff (sets > hll-m22:~ byrnejb$ alias A function is not an alias. -- rgds Stephen ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
No OSX here either, but just to be sure, could you publish the results of: which cd; echo $? locate cd | grep '/cd'$; echo $? ls -ldb ~/Library/Application* On 4 June 2014 20:42, James B. Byrne wrote: > > On Tue, June 3, 2014 12:13, SilverTip257 wrote: > > Escape the space with a backslash. > > cd ~/Library/Application\ Support > > > hll-m22:~ byrnejb$ cd ~/Library/Application\ Support > -bash: cd: /Users/byrnejb/Library/Application: No such file or directory > hll-m22:~ byrnejb$ cd ~/"Library/Application\ Support" > -bash: cd: /Users/byrnejb/Library/Application\: No such file or directory > > > On Tue, June 3, 2014 12:37, Stephen Harris wrote: > > The OP likely has a function called "cd" which does other stuff (sets > > the prompt?) and then calls the builtin cd, but its not quoting the > > variables properly and so breaking. > > > hll-m22:~ byrnejb$ alias > alias ..='cd ..' > alias ...='cd ../..' > alias copy='cp -i' > alias cp='cp -i' > alias > etl='~/projects/proforma.git/vendor/plugins/activewarehouse-etl/bin/etl' > alias la='ls -la' > alias ll='ls -l' > alias mate='gvim -c NERDTree' > alias mc='mc -c' > alias mcd='mount /mnt/cdrom' > alias rm='rm -i' > alias search='grep' > alias ucd='umount /mnt/cdrom' > $ unalias cd > -bash: unalias: cd: not found > > On Tue, June 3, 2014 13:03, Paul Heinlein wrote: > > Try > > > > cd "${HOME}/Library/Application Support/" > > > hll-m22:~ byrnejb$ cd "${HOME}/Library/Application Support/" > -bash: cd: /Users/byrnejb/Library/Application: No such file or directory > > I had already tried many different ways of specifying the target directory > before giving up and asking for help. > > The suggestions concerning a cd alias seem promising because at one time I > had > RVM installed, which does override cd. There is no alias present but there > are > artefacts of rvm scattered about so I will check these. > > Thanks for the help. > > -- > *** E-Mail is NOT a SECURE channel *** > James B. Byrnemailto:byrn...@harte-lyne.ca > Harte & Lyne Limited http://www.harte-lyne.ca > 9 Brockley Drive vox: +1 905 561 1241 > Hamilton, Ontario fax: +1 905 561 0757 > Canada L8E 3C3 > > ___ > CentOS mailing list > CentOS@centos.org > http://lists.centos.org/mailman/listinfo/centos > -- "Life on Earth may be expensive, but it comes with a free ride around the Sun." ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Tue, June 3, 2014 12:13, SilverTip257 wrote: > Escape the space with a backslash. > cd ~/Library/Application\ Support > hll-m22:~ byrnejb$ cd ~/Library/Application\ Support -bash: cd: /Users/byrnejb/Library/Application: No such file or directory hll-m22:~ byrnejb$ cd ~/"Library/Application\ Support" -bash: cd: /Users/byrnejb/Library/Application\: No such file or directory On Tue, June 3, 2014 12:37, Stephen Harris wrote: > The OP likely has a function called "cd" which does other stuff (sets > the prompt?) and then calls the builtin cd, but its not quoting the > variables properly and so breaking. > hll-m22:~ byrnejb$ alias alias ..='cd ..' alias ...='cd ../..' alias copy='cp -i' alias cp='cp -i' alias etl='~/projects/proforma.git/vendor/plugins/activewarehouse-etl/bin/etl' alias la='ls -la' alias ll='ls -l' alias mate='gvim -c NERDTree' alias mc='mc -c' alias mcd='mount /mnt/cdrom' alias rm='rm -i' alias search='grep' alias ucd='umount /mnt/cdrom' $ unalias cd -bash: unalias: cd: not found On Tue, June 3, 2014 13:03, Paul Heinlein wrote: > Try > > cd "${HOME}/Library/Application Support/" > hll-m22:~ byrnejb$ cd "${HOME}/Library/Application Support/" -bash: cd: /Users/byrnejb/Library/Application: No such file or directory I had already tried many different ways of specifying the target directory before giving up and asking for help. The suggestions concerning a cd alias seem promising because at one time I had RVM installed, which does override cd. There is no alias present but there are artefacts of rvm scattered about so I will check these. Thanks for the help. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Tue, 3 Jun 2014, James B. Byrne wrote: Apologies for this OT post. I need some help debugging a bash script. It just happens to be provided by Apple Inc. In a terminal session under OSX-10.9.3 I want do do this: cd ~/'Library/Application Support' Try cd "${HOME}/Library/Application Support/" -- Paul Heinlein heinl...@madboa.com 45°38' N, 122°6' W___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Tue, Jun 03, 2014 at 09:34:29AM -0700, Bill Campbell wrote: > On Tue, Jun 03, 2014, James B. Byrne wrote: > >Apologies for this OT post. I need some help debugging a bash script. It > >just happens to be provided by Apple Inc. > > > >In a terminal session under OSX-10.9.3 I want do do this: > > > >cd ~/'Library/Application Support' > > Works for me on my OS X 10.8.5 Macbook Pro, xterm under xQuartz > and under the Terminal.app. The OP likely has a function called "cd" which does other stuff (sets the prompt?) and then calls the builtin cd, but its not quoting the variables properly and so breaking. -- rgds Stephen ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Tue, Jun 03, 2014, James B. Byrne wrote: >Apologies for this OT post. I need some help debugging a bash script. It >just happens to be provided by Apple Inc. > >In a terminal session under OSX-10.9.3 I want do do this: > >cd ~/'Library/Application Support' Works for me on my OS X 10.8.5 Macbook Pro, xterm under xQuartz and under the Terminal.app. >Which is a simple enough request. However, OSX returns: cd >/users/byrnejb/Library/Application: No such file or directory. The space >evidently acts as a delimiter to cd even though the path is quoted. > >However this: > >ls -l ~/'Library/Application Support' Perhaps you have 'cd' as an alias or a function which loses the quotes when passing to the real cd? Bill -- INTERNET: b...@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way Voice: (206) 236-1676 Mercer Island, WA 98040-0820 Fax:(206) 232-9186 Skype: jwccsllc (206) 855-5792 For every subtle and complicated question, there is a perfectly simple and straightforward answer, which is wrong. -- H. L. Mencken ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] [OT] OSX-10.9.3 cd ~'/ problem with spaces'
On Tue, Jun 3, 2014 at 10:53 AM, James B. Byrne wrote: > Apologies for this OT post. I need some help debugging a bash script. It > just happens to be provided by Apple Inc. > > In a terminal session under OSX-10.9.3 I want do do this: > > cd ~/'Library/Application Support' > > Which is a simple enough request. However, OSX returns: cd > /users/byrnejb/Library/Application: No such file or directory. The space > evidently acts as a delimiter to cd even though the path is quoted. > I don't use, nor do I have a copy of OSX to test against, but my suggestion may still apply. Escape the space with a backslash. cd ~/Library/Application\ Support -- ---~~.~~--- Mike // SilverTip257 // ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos