Hello, On Sat, 14 May 2011, Randall R Schulz wrote:
On Saturday May 14 2011, Anders Johansson wrote:
On Saturday 14 May 2011 21:54:41 David C. Rankin wrote:
[[ -d "$tgzdir" ]] || mkdir -p "$tgzdir" [..] By the way, I don't think it's a bug that ~ is not expanded within quotes.
It is not. ==== man bash ==== Tilde Expansion If a word begins with an unquoted tilde character (`~'), [..] ^^^^^^^^ ==== BTW: to get rid of that '~' dir, use perl[1] or maybe './~/' (don't know if the latter works). Oh, and you should probably use home=$(getent passwd <USERNAME> | cut -d: -f6) anyway instead of using '~'. If that's overkill, let the tilde expand by not quoting at the right stage: $ foo=~/"bar" $ echo "$foo" /home/dh/bar I.e.: do NOT quote the initial ~/, but put the rest in "". Sidenote: You need not to quote the / after ~. Wierd bashism I'd guess. So: tgzdir=~/"whatever" ... should work for you. HTH, -dnh [1] perl -e 'unlink("/path/to/weird/~");' or something like that. -- All Hardware Sucks and I do not consider myself to actually have any data until there's an offsite backup of it. -- Anthony de Boer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org