Shell script for Creating Directory with name as system date

Dear Sir/Madam,

I need a bit of your help. The problem is as follows :

I have to create a directory in unix whose name is that of system date in the dd_mon_yyyy format . I am able to extract a date in required format ina variable , but when i'm using this variable in mkdir it is not creating a directory of that date, rather it is creating the dirictory of the same name as the variable( mkdir accepts a string name for creating directories , but I don't know how to convert date to string using shell scripting). I am writing below the piece of script of what I am doing. Plz correct me where ever possible. i hope to see a nice running solution from your side.

>Today='date +%d_%m_%Y'
>set
>$Today
>mkdir $Today

I hope you will help me.

plz do mail me a solution at EMAIL ADDRESS REMOVED

Thanks in advance.
Arun

Please make sure that you have read our rules. And note:
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.

Try this code:

mkdir $(date +%d_%m_%Y)

or

mkdir `date +%d_%m_%Y`

Hi,

I have tried using

Today='date +%m%d%Y'
set
mkdir $today

But its not working. I am working on telnet. Every time it is creating directory with name date +%m%d%Y .. Plz tell me what should i do.

Thanks
Aru

Even with :

mkdir $(date +%d%m%Y)

it is giving the error syntax error : '(' unexpected

And with :

mkdir 'date +%m%d%Y'

it is creating dir with name date +%d%m%Y , but not with system date.

Plz help

Whatever blowtorch has given works well for me.

What OS are you on ?

And it is not

mkdir 'date +%m%d%Y'

it is

mkdir `date +%m%d%Y`

Note the difference between ` and '

` is the backtick character above the tab key.

try with blowtorch's code(mkdir `date +%d_%m_%Y`), its working fine.
You have to place the backquotes(`) before and after the date command, you might have placed single quotes check it once.

Regards,
Raju

thankyou very much for correcting ..... its working .... Raju for yesterday only , this small thing was creating problem..... I really apperitiate you for correcting me.

thanx very much ..... All :-))