Changes

Jump to: navigation, search

Tutorial11: Sed & Awk Utilities

No change in size, 09:08, 25 July 2020
INVESTIGATION 2: USING THE AWK UTILITY
# Issue the following linux command to display display the car make, model number, quantity and price of all vehicles that are prices less than $5,000:<br><span style="color:blue;font-weight:bold;font-family:courier;">awk '$5 < 5000 {print $1,$2,$4,$5}' cars.txt</span><br><br>What do you notice?<br><br>
# Issue the following linux command to display display the car make, model number, quantity and price of all vehicles that are prices less than $5,000:<br><span style="color:blue;font-weight:bold;font-family:courier;">awk '$5 < 5000 {print $1,$2,$4,$5}' cars.txt</span><br><br>The symbol tilde '''~''' is used to match a pattern for a particular field number.<br><br>
# Issue the following linux command to display the car make, year and quantityof 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>
# x
13,420
edits

Navigation menu