Changes

Jump to: navigation, search

Tutorial11: Sed & Awk Utilities

754 bytes added, 09:11, 19 July 2020
LINUX PRACTICE QUESTIONS
'''Review Questions:'''
'''Part A: Display Results from Using the sed Utility'''
Note the contents from the following tab-delimited file called '''~murray.saul/uli101/stuff.txt''':
Write the results of each of the following Linux commands for the above-mentioned file.: 
# sed -n '3,6 p' ~murray.saul/uli101/stuff.txt<br><br>
# sed '/the/ d' ~murray.saul/uli101/stuff.txt<br><br>
# sed 's/line/NUMBER/g' ~murray.saul/uli101/stuff.txt
 
 
'''Part B: Writing Linux Commands Using the sed Utility'''
 
Write a single Linux command to perform the specified tasks for each of the following questions.
 
 
# Write a Linux sed command to display only lines 5 to 9 for the file: ~murray.saul/uli101/stuff.txt<br><br>
# Write a Linux sed command to display only lines the begin the pattern “and” for the file: ~murray.saul/uli101/stuff.txt<br><br>
# Write a Linux sed command to display only lines that end with a digit for the file: ~murray.saul/uli101/stuff.txt<br><br>
# Write a Linux sed command to save lines that match the pattern “line” (upper or lowercase) for the file: ~murray.saul/uli101/stuff.txt and save results (overwriting previous contents) to: ~/results.txt<br><br>
 
 
 
13,420
edits

Navigation menu