Linux bash script to copy files
- or -
Post a project like this3202
£50(approx. $62)
- Posted:
- Proposals: 3
- Remote
- #829388
- Awarded
Description
Experience Level: Intermediate
General information for the business: Various
Description of requirements/functionality: I need a bash script that will do the following.
Navigate to a path that is made up of the current date, i.e.
/var/spool/asterisk/monitor/{year}/{month}/{day}/
Today's path would be /var/spool/asterisk/monitor/2015/07/05/
For each file in the directory it needs to copy the file to /mnt/myshare
But, it needs to modify the filename to remove the colon (:) character, because /mnt/myshare is a windows share so the : is invalid, I want to replace : with -
So, the old filename would look like this:
11:57:20_outgoing_0XXXXXXXXX7:0XXXXXXXX4.wav
I want to copy it as:
11-57-20_outgoing_0XXXXXXXXX7-0XXXXXXXX4.wav
Thanks
OS requirements: Linux
Extra notes:
Description of requirements/functionality: I need a bash script that will do the following.
Navigate to a path that is made up of the current date, i.e.
/var/spool/asterisk/monitor/{year}/{month}/{day}/
Today's path would be /var/spool/asterisk/monitor/2015/07/05/
For each file in the directory it needs to copy the file to /mnt/myshare
But, it needs to modify the filename to remove the colon (:) character, because /mnt/myshare is a windows share so the : is invalid, I want to replace : with -
So, the old filename would look like this:
11:57:20_outgoing_0XXXXXXXXX7:0XXXXXXXX4.wav
I want to copy it as:
11-57-20_outgoing_0XXXXXXXXX7-0XXXXXXXX4.wav
Thanks
OS requirements: Linux
Extra notes:
Ben D.
100% (27)Projects Completed
23
Freelancers worked with
24
Projects awarded
53%
Last project
7 Oct 2019
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies