Computer scienceSystem administration and DevOpsCommand lineText processing

Grep useful options

Where is zebra?

Report a typo

Using -A <n> option, print the search result of the word "zebra" with 2 lines after it from the file /tmp/animals.txt.

Sample Input 1:

lion
pinguin
zebra
hippopotamus
giraffe 

Sample Output 1:

zebra
hippopotamus
giraffe 
Write a program in Shell
#!/usr/bin/env bash
solve() {
# add your solution here

}
___

Create a free account to access the full topic