create a command line tool that takes in a directory, and prints all of its subdirectories in a formatted fashion
$10-30 USD
Paid on delivery
In many command line interfaces, there is a command called tree that either already exists of you can download via a package manager. Delmar doesn't let us do that, unfortunately, so we'll have to build our own.
For this project, your goal is to create a command line tool that takes in a directory, and prints all of its subdirectories in a formatted fashion. For example, suppose I pass in a directory with its own subdirectories for a project:
example-app
|-- [login to view URL]
|-- src
| |-- main
| | `-- java
| | `-- main
| | |-- [login to view URL]
| | `-- [login to view URL]
| `-- test
| `-- java
| `-- main
| |-- [login to view URL]
| `-- [login to view URL]
`-- target
|-- classes
| |-- [login to view URL]
| `-- main
| `-- [login to view URL]
|-- generated-sources
| `-- annotations
|-- generated-test-sources
| `-- test-annotations
|-- maven-status
| `-- maven-compiler-plugin
| |-- compile
| | `-- default-compile
| | |-- [login to view URL]
| | `-- [login to view URL]
| `-- testCompile
| `-- default-testCompile
| |-- [login to view URL]
| `-- [login to view URL]
|-- surefire-reports
| |-- [login to view URL]
| |-- [login to view URL]
| |-- [login to view URL]
| `-- [login to view URL]
`-- test-classes
|-- [login to view URL]
`-- main
`-- [login to view URL]
Submit a copy of your bash script's code via canvas. For now, just copy paste the code directly out of vim or nano (or use cat and print the code to the command line).
How to Submit
Try doing the program in chunks. Don't attempt to do everything in one sitting.
Start by drawing out what it is you think that the program should do.
In our notes, we've created a number of applications that extract information from grep and sed, split strings to act as arrays, and deal with file inputs.
Where to start:
Bonus points: Colorize your output to distinguish between ordinary files and directories.
Determine the filetype of what is passed in, and throw an error / exit if not a directory.
Print a tree of the file hierarchy of the supplied directory's subdirectories and files.
Your application should be able to:
Project ID: #27426349
About the project
6 freelancers are bidding on average $36 for this job
Hi There!! I have 6+ Years of experience in Shell scripting in various flavours of Linux. I should be able to do this for you. Ping me we can talk and take this forward.
Hello, I am an expert Linux administrator with a lot Shell scripting experience, I am sure that I can develop this tree view without problem
Hi. I have 2 years of professional experience in bash scripting and using Unix based os. I created similar scripts already. Best regards. Michał