Angel Tsankov wrote:
> Greg Wooledge wrote:
> Let's say that removing '-p' is straightforward, but what about setting the
> sticky bit to every newly created directory component?
>
mkdir also has the -m argument, so you could do
mkdir -m 1755 dir
interestingly -m does not apply to parent directories created with -p
If you wanted to deal with the -p, I would remove it and not pass it to mkdir,
but create them yourself in the function. I'd use parameter expansion to deal
with parts of the path 1 by 1.
- Ian Kelling