Its been a long time since I've worked with Shell scripts. I got a script from a co-worker and need it make it do some stuff, and for the life of me, I can get it to work.
Expand|Select|Wrap|Line Numbers
- # Creates the date
- DIR_EXT=`date '+%Y%m%d_%H%M%S'`
- # I want this next line to take the date created above and add a "_" and the value in the $JOB_NAME, and make this one directory.
- UNIQUE_DIR=$DIR_EXT_$JOB_NAME
- #This should tie it all together
- JOBDIR=$HOMEDIR/$DIR_STRING/$UNIQUE_DIR
- echo "Date string is: $DIR_EXT"
- echo "Unique Directory is: $UNIQUE_DIR"
- echo "Job Directory is: $JOBDIR"
Date string is: 20080313_165404
Unique Directory is: Turner_test11
Job Directory is: /corp/home/ai9542/Reshipper/Turner_test11
My question is why isn't the date string in front of the job name (in this case Turner_test11)?
I want it to be "/corp/home/ai9542/Reshipper/20080313_165404_Turner_test11"
Thanks,
Sitko.