Back to all jobs

Linux Shell Script - skeleton directory reproduction.  Add to shortlist

Client Details

TMITTMIT S   
United Kingdom  United Kingdom
  • Member Since: Aug 2009
  • Last Login: 26 Apr 2012
  • Jobs Posted: 2
  • Jobs Awarded: 1
  • Paid out: $157

Job Details

Category:IT/Web/Programming > General Programming

ID:16235

Title:Linux Shell Script - skeleton directory reproduction.

Location:Anywhere

Job Description

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.

Job Budget

Type:Fixed Price

Budget:Up to £250 (Approx Up to $392)

Additional Information

Attached Files: None

Bidding ends:Bidding Closed

Job Posted:12/01/2010 17:04

Bidding activity on this Job

Bids:4

Who has Bid:


View 1 more bids

Clarification Board

M. H.M. H. on 12/01/2010 18:44
Do you consider Python a standard linux shell command too, as it is provided with virtually all Linux distributions.

Bidding closed

Stay safe: Read our safety guidelines before bidding

Bidding has ended for this project, the client has accepted the bid(s) below:

Accepted Bid #1

Amount: $157 Fixed Fee

Country of Freelancer: United Kingdom  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





Here are some practical tips on staying safe


Remember: if something looks too good to be true, it probably is!

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}