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"
Incidentally, if you use -p you don't have to test to see if it exists first. mkdir -p will simply exit silently if the directory already exists
It also allows you to make a deep path without going step by step down in. So... % mkdir -p /tmp/foo/bar/baz/oh-boy ... does what this does without -p: % mkdir /tmp/foo % mkdir /tmp/foo/bar % mkdir /tmp/foo/bar/baz % mkdir /tmp/foo/bar/baz/oh-boy
Anders
By the way, I don't think it's a bug that ~ is not expanded within quotes. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org