Skip to content

Commit

Permalink
Update 3_AdvancedTerminal.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanSD committed Jan 19, 2022
1 parent 4be9ae9 commit f709ca2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/3_AdvancedTerminal.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ File2.txt:
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=17kYqxphGrkCK30FQuOUDIXOUhiZvjAMd' -O file2.txt
```
**1. file1.txt contains the text of a Sherlock Holmes book. How many lines of the file does it take to recount his tale in Bohemia?**
*Hint: The table of contents is form line 48 to 70*
<details>
<summary>Stumped? Click me!</summary>

Expand All @@ -35,6 +36,10 @@ wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=17kYq
```shell
head -n 70 file1.txt | tail -n 22
```
You can also use command `awk` which is a great multipurpose effecitent text processing command.
```shell
awk "NR<70" file1.txt | awk "NR>48"
```
</details>

**2. How many lines in file2.txt contain a period? (*Hint: The answer is not 60*)**
Expand Down

0 comments on commit f709ca2

Please sign in to comment.