14 May
2011
14 May
'11
19:54
Guys, Here is a strange bashism. I want to check that ~/tde/tgz exists or I want to create the directory. So I do: # set tgzdir for output of tarballs tgzdir="${2:-~/tde/tgz}" [[ -d "$tgzdir" ]] || mkdir -p "$tgzdir" To my surprise, it created a directory named '~' in the pwd: scr/~/ scr/~/tde/ scr/~/tde/tgz/ Huh?? I know I could use $HOME instead, but I want to understand what rule I'm violating. Seems like I've successfully used this in the past. What say the gurus? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org