vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I have noticed that 'mkdir -p a/b/c/d' creates the missing directories but returns '2' if either a, b, c or d exists beforehand (Unixware 7.1.1). Is this expected behaviour on Unixware or has this changed in later versions? ciao Klaus |
| |||
| Klaus Heinz wrote: > Hi, > > I have noticed that 'mkdir -p a/b/c/d' creates the missing directories > but returns '2' if either a, b, c or d exists beforehand (Unixware > 7.1.1). > > Is this expected behaviour on Unixware or has this changed in later > versions? I don't know what is expected on Unixware but it sure doesn't work that way on Linux or bsd -- Tony Lawrence http://aplawrence.com |
| |||
| > Klaus Heinz wrote: > > > > I have noticed that 'mkdir -p a/b/c/d' creates the missing > directories > > but returns '2' if either a, b, c or d exists beforehand (Unixware > > 7.1.1). > > > > Is this expected behaviour on Unixware or has this changed in later > > versions? This was incorrect behavior. mkdir -p of an existing directory correctly returns 0 on UW 7.1.4 (the current release). This fix was first made in UW 7.1.2 (aka Open UNIX 8). Jonathan Schilling |
| |||
| Klaus Heinz wrote: > I have noticed that 'mkdir -p a/b/c/d' creates the missing directories > but returns '2' if either a, b, c or d exists beforehand (Unixware > 7.1.1). > > Is this expected behaviour on Unixware or has this changed in later > versions? I tested this on UW714 and it returned 0: $ cd /tmp $ rm -rf a $ mkdir -p a/b/c/d; echo $? 0 $ mkdir -p a/b/c/d; echo $? 0 $ rm -rf a $ touch a $ mkdir -p a/b/c/d; echo $? UX:mkdir: ERROR: Cannot create directory "a/b/c/d": Not a directory 2 From the source, it appears that this changed some time between the release of OpenUnix 8.0.0 (UW712) and the release of UnixWare 7.1.3. >Bela< |
| ||||
| Bela Lubkin <belal@sco.com> wrote: > From the source, it appears that this changed some time between the > release of OpenUnix 8.0.0 (UW712) and the release of UnixWare 7.1.3. Thanks for the answers. Am I correct that this is not available as a patch (ptf?) for versions < 7.1.3? It seems I will have to test for "< 7.1.3" to determine whether my shell replacement for 'mkdir' should be used. ciao Klaus |