Pádraig Brady wrote:
> Caleb Cushing wrote:
>> be awesome if mkdir had a way to specify the user:group ownership
>> being made. given this would be limited by perms. but as root it could
>> be good.
>>
>> just throwing it out there.
>
> Perhaps a simple wrapper around install would be better?
>
> mkudir() { u="$1"; g="$2"; shift 2; install -d -o$u -g$g "$@"; }
For the record, you can (and IMHO should; less syntax is better) avoid
quoting a simple $var on the RHS, and you must double-quote _uses_ of
variables like $u and $g that may potentially contain meta-characters:
mkudir() { u=$1; g=$2; shift 2; install -d -o"$u" -g"$g" "$@"; }
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils