SIMULATION - Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile. Suggested Answer: See explanation below. # cat /etc/testfile | while read line; do echo $line | grep abcde | tee -a /tmp/testfile done OR - grep `abcde' /etc/testfile > /tmp/testfile This question is in EX200 Red Hat Certified System Administrator (RHCSA) Exam For getting Red Hat Certified System Administrator (RHCSA) Certificate Disclaimers: The website is not related to, affiliated with, endorsed or authorized by Redhat. Trademarks, certification & product names are used for reference only and belong to Redhat. The website does not contain actual questions and answers from Redhat's Certification Exam.
Please login or Register to submit your answer