13,420
edits
Changes
→Using the sed Utility
'''Examples:'''
<span style="font-family:courier;font-weight:bold">sed -n '3 p' text.txt (print 3rd line)<br>sed -n '1-5 p' text.txt (print lines 1 to 5)<br>sed -n '4,7 p' text.txt (print only lines 4 and 7)<br>sed -n'/^Therefore/ p' text.txt (print lines that begin with the patterh "Therefore")<br><br>sed </span>>
===Using the awk Utility===