Could anyone help me with the below scripting task.
my requirement is as below
- I have two directories /var/tmp/dir1 & /var/tmp/dir2
once i run the script test.sh it should ask as below.
Please choose the below path 1 (or) 2
-
/var/tmp/dir1
-
/var/tmp/dir2
else. exit -
once i enter 1, it should go to the path /var/tmp/dir1/08042015/
here is a directory 08042015 (ddmmyyyy) with current date
- in 08042015 dir - redirect the output of the command "ls -lrt" to a file if output count (ls -lrt |wc -l > 10). (if output found redirect or wait for ls -lrt the output)