Category:IT/Web/Programming > General Programming
ID:16235
Title:Linux Shell Script - skeleton directory reproduction.
Location:Anywhere
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.
Type:Fixed Price
Budget:Up to £250 (Approx Up to $392)
Attached Files: None
Bidding ends:Bidding Closed
Job Posted:12/01/2010 17:04
Stay safe: Read our safety guidelines before bidding
Bidding has ended for this project, the client has accepted the bid(s) below:
Accepted Bid #1Amount: $157 Fixed Fee
Country of Freelancer:
United Kingdom
Acceptance Reason: Clear, open freelance bid from a NAMED individual in the UK with a validated reputation.
Estimated Start Date: Within 3 Business Days
If you are in doubt of the legitimacy of a Job and or Client, let us know by Reporting the Job.
For further support on preventing and reporting fraud please contact the UK’s National fraud reporting centre at http://www.actionfraud.org.uk/ or outside the UK Fraud Watchers at {fraudWatchers}