bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkdir owner:group option


From: Mike Frysinger
Subject: Re: mkdir owner:group option
Date: Tue, 10 Mar 2009 07:10:39 -0400
User-agent: KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; )

On Tuesday 10 March 2009 06:47:11 Pádraig Brady wrote:
> Mike Frysinger wrote:
> > On Tuesday 10 March 2009 06:11:47 Jim Meyering wrote:
> >> Mike Frysinger wrote:
> >>> mkudir() { (u=$1; g=$2; shift 2; install -d -o"$u" -g"$g" "$@"); }
> >>
> >> Good idea.
> >> I prefer to use "local", and thus to avoid forking a subshell.
> >
> > in general, i agree.  however, some people like to omit "local" support
> > from their shell (since it isnt in POSIX), or do really stupid s**t like
> > requiring quoting on the RHS (dash comes to mind).
>
> Testing with an old dash (0.5.4-1ubuntu3) shows that it
> handles local, and does not need quoting on RHS.

that's because ubuntu has patched it.  get the source from upstream (or most 
any other distro) and watch dash suck

$ f() { local v=$1 ; echo $v ;}
$ f a
a
$ f "a b"
a
$ f "c -1 d"
local: 3: -1: bad variable name
c
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]