Changes

Jump to: navigation, search

Tutorial11: Sed & Awk Utilities

118 bytes added, 11:07, 2 September 2020
INVESTIGATION 2: USING THE AWK UTILITY
# Issue the following linux command to display the car make, year and quantity of all car makes that begin with the letter 'f':<br><span style="color:blue;font-weight:bold;font-family:courier;">awk '$1 ~ /^f/ {print $1,$2,$4}' cars.txt</span><br><br>Compound criteria symbols can be used to join search statements together<br><br>Compound Operators:<br><br>'''&&''' &nbsp;&nbsp;&nbsp;&nbsp;(and)<br>'''||''' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or)<br><br>
# Issue the following linux command to list all "fords" that are greater than $10,000 in price:<br><span style="color:blue;font-weight:bold;font-family:courier;">awk '$1 ~ /ford/ && $5 > 10000 {print $0}' cars.txt</span><br><br>
# After you complete the Review Questions sections to get additional practice, then work on your'''online assignment 3,'''<br>online assignment 3.sections 4 to 6 labelled: '''More Scripting (add)''', '''Yet More Scripting (oldfiles)''', and '''sed And awk'''<br><br>
= LINUX PRACTICE QUESTIONS =
13,420
edits

Navigation menu