Solved

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

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 90
sum28 challenge 31 112
tripleUp challenge 7 79
zeroFront challenge 7 98
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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…

770 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