Solved

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

Posted on 2006-06-26
3
420 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now