This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| Pipes : | |
| 1)Download the contents of "Harry Potter and the Goblet of fire" using the command line from here | |
| curl -o harry.txt "https://raw.githubusercontent.com/bobdeng/owlreader/master/ERead/assets/books/Harry%20Potter%20and%20the%20Goblet%20of%20Fire.txt" | |
| explanation : curl command is used to get data from the url we provided(API endpoint) | |
| curl -o helps to save content in that file | |
| 2)Print the first three lines in the book | |
| head -n 3 harry.txt | |
| explanation : head command is used to print starting lines of the file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| 1)mkdir -p hello/five/six/seven | |
| explanation : mkdir used to create a folder | |
| mkdir -p create multiple folders at a time | |
| 2)mkdir -p hello/one/two/three/four | |
| 3)touch hello/five/six/c.txt | |
| 4)touch hello/five/six/seven/error.log | |
| 5)touch hello/one/a.txt | |
| 6)touch hello/one/b.txt | |
| 7)touch hello/one/two/d.txt |