[CentOS] [SOLVED] [OT] OSX-10.9.3 cd ~'/ problem with spaces'

Thu Jun 5 13:38:04 UTC 2014
Lars Hecking <lhecking at users.sourceforge.net>

> 1. What does the 1+ in the shell expansion ${1+"$@"} mean and do?
 
 http://unix.stackexchange.com/questions/68484/what-does-1-mean-in-a-shell-script-and-how-does-it-differ-from

> 2. I know that $0 returns the shell name or shell script file name.  How does
> ${0##*/} differ in effect from $0.
 
 It strips a leading path. $0 is the shell/script exactly as it was invoked.

$ pwd
/home/user
$ ../../bin/bash
[bash] $ echo $0
../../bin/bash
[bash] $ echo ${0##*/}
bash
[bash] $