Text Manipulation
23
Hacker Challenge: Using grep, nl, tail, and head
Let’s say you want to display the five lines immediately before a line that
says
# Step #6: Configure output plugins
using at least four of the commands
you just learned. How would you do it? (Hint: there are many more options
to these commands than those we’ve discussed. You can learn more com-
mands by using the built-in Linux command
man
. For example,
man tail
will
show the help file for the
tail
command.)
There are many ways to solve this challenge; here, I show you which
lines to change to do it one way, and your job is to find another method.
Step 1
kali >