annanathan
Programmer
Hi all,
I'm trying to create a directory with the current day of the following format: "date '%d_%B_%y'", since I want this job to run every day and create directory for each day...
Then I want to change directory of the newly created directory, but it's not working.
This is what I did...
The directory is getting created fine, but i get error saying that the 'cd' command cannot be found ...
The whole purpose of this script is to find all the .log files with the current date and put them is the current date directory (does anyone has any other approach to this problem?)
Please help...
Any help is appreciated,
Thank you.
I'm trying to create a directory with the current day of the following format: "date '%d_%B_%y'", since I want this job to run every day and create directory for each day...
Then I want to change directory of the newly created directory, but it's not working.
This is what I did...
Code:
date '%d_%B_%y' |xargs mkdir
date '%d_%B_%y' |xargs cd
The whole purpose of this script is to find all the .log files with the current date and put them is the current date directory (does anyone has any other approach to this problem?)
Please help...
Any help is appreciated,
Thank you.