I am confused about the differences between grep, awk and sed in terms of their role in Unix/Linux system administration and text processing.
I am confused about the differences between grep , awk and sed in terms
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short definition:
grep: search for specific terms in a fileNow
awkandsedare completly different thangrep.awkandsedare text processors. Not only do they have the ability to find what you are looking for in text, they have the ability to remove, add and modify the text as well (and much more).awkis mostly used for data extraction and reporting.sedis a stream editorEach one of them has its own functionality and specialties.
Example
Sed
Awk
Basic
awkusage:Compute sum/average/max/min/etc. what ever you may need.
I recommend that you read this book: Sed & Awk: 2nd Ed.
It will help you become a proficient sed/awk user on any unix-like environment.