Solved

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Define unique primary key 9 95
VBA "SendKeys" Syntax for Multiple Keystrokes 7 117
has77  challenge 9 90
I could not set window to top 4 21
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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