Hi All,
I need help to write a script based on the following requirement.
The script will scan the system time. It will move *.* from /home/test1 to /home/backup/. There will be files e.g. laser1, laser2, laser3 ... in the target folder. If the current system time is 7:30, the script will move all the files with "_a" as suffix with all the file names like laser1_a, laser2_a, laser3_a......
If the current system time is 8:30, the script will move all the files with "_b" as suffix with all the file names like laser1_b, laser2_b, laser3_b......
If the current system time is 9:30, the script will move all the files with "_c" as suffix with all the file names like laser1_c, laser2_c, laser3_c.....
There will be no "suffix like _a, _b & _c" in the target directory. But the script will rename all the files with proper suffix & then move them to destination.
Can anybody please help me to write the script ?
Regards - Sraj
I need help to write a script based on the following requirement.
The script will scan the system time. It will move *.* from /home/test1 to /home/backup/. There will be files e.g. laser1, laser2, laser3 ... in the target folder. If the current system time is 7:30, the script will move all the files with "_a" as suffix with all the file names like laser1_a, laser2_a, laser3_a......
If the current system time is 8:30, the script will move all the files with "_b" as suffix with all the file names like laser1_b, laser2_b, laser3_b......
If the current system time is 9:30, the script will move all the files with "_c" as suffix with all the file names like laser1_c, laser2_c, laser3_c.....
There will be no "suffix like _a, _b & _c" in the target directory. But the script will rename all the files with proper suffix & then move them to destination.
Can anybody please help me to write the script ?
Regards - Sraj