Linux Shell Script - skeleton directory reproduction.
5218
£250(approx. $314)
- Posted:
- Proposals: 4
- Remote
- #16235
- Archived
Description
Experience Level: Expert
We require a properly documented shell script for the following:
Specification (in 4 parts):
Part a:
Create a text file ('dirfile') showing the recursive directory structure of every directory below the current directory ('curdir').
Each directory will be on a new line in the text file and indented by one dot (hex 2E) for each level of directory it is below 'curdir', viz.
curdir
.1stlevelDirA
..2ndlevelDirAA
..2ndlevelDirAB
.1stlevelDirB
.1stlevelDirC
..2ndlevelDirCA
..3rdlevelDirCAA
.1stlevelDirD
Part b:
Repeat (a) above piping to 'curdirfiles' instead of 'curdir' with additional features:
- accept a single parameter ('filename')
- wherever a file exists in ANY of the directories of the form 'filename.<EXT>' where '<EXT>' may be any file extension then the file 'curdirfiles' will show the file in the listing. ie. ONLY the files begining with 'filename'
.1stlevelDirA
..2ndlevelDirAA
...filename.html <<<<<
...filename.php <<<<<
...filename2.php <<<<<
...filename_backup.php <<<<<
..2ndlevelDirAB
.1stlevelDirB
.1stlevelDirC
...filename.html <<<<<
...filename.cgi <<<<<
..2ndlevelDirCA
..3rdlevelDirCAA
.1stlevelDirD
..filename.txt <<<<<
Part c:
Similar to part (b) above except
Reproduce an identical directory structure as curdir called curdir2 on the same level as curdir with all file and directory perms and ownerships the same as they are in curdir.
Part d:
Same as part (c) above except duplicate the files as well like in part b. - again with all perms and ownerships preserved.
All code must be documented with a description of all variables - what they are for and where they are used.
Any regex used must be fully expained.
Only standard Linux shell commands may be used.
Specification (in 4 parts):
Part a:
Create a text file ('dirfile') showing the recursive directory structure of every directory below the current directory ('curdir').
Each directory will be on a new line in the text file and indented by one dot (hex 2E) for each level of directory it is below 'curdir', viz.
curdir
.1stlevelDirA
..2ndlevelDirAA
..2ndlevelDirAB
.1stlevelDirB
.1stlevelDirC
..2ndlevelDirCA
..3rdlevelDirCAA
.1stlevelDirD
Part b:
Repeat (a) above piping to 'curdirfiles' instead of 'curdir' with additional features:
- accept a single parameter ('filename')
- wherever a file exists in ANY of the directories of the form 'filename.<EXT>' where '<EXT>' may be any file extension then the file 'curdirfiles' will show the file in the listing. ie. ONLY the files begining with 'filename'
.1stlevelDirA
..2ndlevelDirAA
...filename.html <<<<<
...filename.php <<<<<
...filename2.php <<<<<
...filename_backup.php <<<<<
..2ndlevelDirAB
.1stlevelDirB
.1stlevelDirC
...filename.html <<<<<
...filename.cgi <<<<<
..2ndlevelDirCA
..3rdlevelDirCAA
.1stlevelDirD
..filename.txt <<<<<
Part c:
Similar to part (b) above except
Reproduce an identical directory structure as curdir called curdir2 on the same level as curdir with all file and directory perms and ownerships the same as they are in curdir.
Part d:
Same as part (c) above except duplicate the files as well like in part b. - again with all perms and ownerships preserved.
All code must be documented with a description of all variables - what they are for and where they are used.
Any regex used must be fully expained.
Only standard Linux shell commands may be used.
TMIT S.
0% (0)Projects Completed
1
Freelancers worked with
1
Projects awarded
50%
Last project
18 Jan 2010
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