- Assume that you have the following file:
Welcome to shell scripting.
I love shell scripting.
shell scripting is awesome.
Say you run the following command:
$ awk '/awesome$/{print $0}' myfile
How many lines will be printed in the output?
- How many lines will be printed if we use the following command against the previous file?
$ awk '/scripting\..*/{print $0}' myfile
- How many lines will be printed if we use the following command against the previous sample file?
$ awk '/^[Ww]?/{print $0}' myfile
- What is the output of the following command?
$ echo "welcome to shell scripting" | sed -n '/Linux|bash|shell/p'