Solved

I keep getting this at stdout "mkdir: usage: mkdir [-m mode] [-p] dirname ..."

Posted on 2006-06-26
3
456 Views
Last Modified: 2013-12-26
This is really odd.

I keep receiving the following line at stdout:

"mkdir: usage: mkdir [-m mode] [-p] dirname ..."

I have the following in my Korn Shell script:

if [[ ! -d $JOB_DIR ]]; then
      mkdir -p "$JOB_DIR"
fi

I tried the mode parameter, but still get this message.

Thoughts or suggestions on how to get rid of this message is greatly appreciated.

Thanks,

--Todd
0
Comment
Question by:jtp51
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 16987667
I guess that $JOB_DIR is unset or empty
0
 
LVL 48

Expert Comment

by:Tintin
ID: 16988437
Add

echo "dir: $JOB_DIR"

before the mkdir and I think you'll see what the problem is.
0
 

Author Comment

by:jtp51
ID: 16992409
ahoffmann: Thanks... sorry guys, I had echoed the variable before and saw a value; however I had made more changes since.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 122
conditional code and condition difference 9 87
withoutTen challenge 14 140
Is there a simple front-end menu system. 9 146
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question