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
How do I run a powershell script?
Explain about sourcing commands?
Given a file find the count of lines containing the word "abc".
How to print pid of the current shell?
Explain about login shell?
What is bash eval?
What does egrep mean?
How can I send a mail with a compressed file as an attachment?
How do I edit a .sh file?
What is echo in shell?
What is scripting autism?
What is bash shell command?
Write down the syntax of "for " loop
What is the significance of the shebang line in shell scripting?
What is meant by $1 in shell script?