I have written the following code to create a directory where the directory name will look like "nowt_hour_nimute_second". But the code is failing in Bash Shell.
#THIS CODE WILL CREATE A DIRECTORY WITH TIME OF CREATION AS PART OF DIRECTORY NAME
#AUTHOR: SUBIR ADHIKARI
#DATE: 02/12/2014
echo "The time is $(date +%H_%M_%S)"
now=$(date +%H_%M_%S)
echo $now
echo $(pwd)
createdep=nowt_$now
echo $(createdep)
mkdir createdep
On executing, I am getting the following output...
The time is 01_12_30
01_12_30
/home/adhikarisubir/test/basic_unix
createfiles.sh: 10: createfiles.sh: createdep: not found
What am I missing here?