I have a file from which I have to do selective printing. I want to print everything from a particular tag till the end. How should I go about it?
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.
Looks like you havent googled this. 🙂
You can use AWK and SED Utilities to get this done.
AWK:
This one liner matches all lines with pattern that is in your regex. Pattern two is 0 which will always be false and hence awk will continue printing lines starting from your matched pattern to the end of file.
SED:
This is similar to awk in terms of Regex range. This matches everything from your pattern to the end of file and prints it.