Answer Posted / satchi
Grep is a filter used for pattern matching in shell script.
It searches for the patern if file name is give, or else it
will look for the input data using pipe(|)
Syntax:
1. Grep <patern to search> <Filename>
2. cat <filename> | grep <Patern to search.>
we can use -i option to ignore case sensitiveness.There are
so many options available.you have to explore that.
| Is This Answer Correct ? | 18 Yes | 4 No |
Post New Answer View All Answers
Which is better perl or shell scripting?
How can we find the process name from its process id?
Print the 10th line without using tail and head command.
What are scripts in psychology?
Determine the output of the following command: [ -z “” ] && echo 0 || echo 1
What is difference between bash and shell?
What is the difference between grep and egrep?
How can I set the default rwx permission to all users on every file which is created in the current shell?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What is echo $shell?
What is shell and shell script?
How would you compare the strings in a shell script?
What is computer cli?
What is shell environment?
What is web script?