Subject: Re: bug#15168: mkdir alway creates a file instead a direktory if it is run trough a sub sub shell

From: Bob Proulx <[email-masked]>
Date: Fri, 23 Aug 2013 12:33:33 -0600

tag 15168 + moreinfo
thanks

horvan dillus wrote:
> three scripts here
> first one getit.sh to get some scripts with wget

Please one bug per bug report.  Three bugs would mean three separate
reports please.  One bug per report.

Note that wget is a different project and any wget bugs would need to
be reported to them not us.  We don't have anything to do with wget here.

> second one install.sh to run the scripts and set up some things with bash

??

> third one the script the crates a subdir vin var/www regardless what im
> doing this creates a file with tha name of the directory.the mode option
> and verbose donsn't make anything better.

Please try to reduce the problem to a small test case.  Show us
exactly what you are doing so that we can reproduce the problem.  If
we can't understand what you are doing then we can't reproduce it and
can't fix it.

> The only situation this works correct is when I debug the script or the
> line with -x
> 
> I haven't any Idea why this is how it is and I guess this needs further
> testing.

Unfortunately you haven't told us anything about the problem.  You say
that mkdir is creating files not directories.  But that is obviously
not right since mkdir creates directories not files.  Please describe
exactly what you are doing.  Saying that some script does something
wrong is not enough information.

If the problem is buried in some script then the simplest reason for a
problem is that the script has a bug in it and not a problem with
mkdir that is used by zillions of people in zillions of scripts every
day.  The simplest explanation is usually the correct one.

Bob