PrepAway - Latest Free Exam Questions & Answers

Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile

CORRECT TEXT
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.

PrepAway - Latest Free Exam Questions & Answers

A.
grep `abcde’ /etc/testfile > /tmp/testfile

B.
echo $line | grep abcde

C.
tee -a /tmp/testfile
done

D.
tee -a /tmp/testfile
done

Explanation:
tee -a /tmp/testfile
done
echo $line | grep abcde | tee -a /tmp/testfile
done
OR
grep `abcde’ /etc/testfile > /tmp/testfile


Leave a Reply