Question
UNIX - Use the testfile1.txt to carry out the following tasks and write the results in a single file named as your
UNIX - Use the testfile1.txt to carry out the following tasks and write the results in a single file named as your
1. Using a sed command, list all chevy cars. 2. Using a sed command, print lines 3 to 6. 3. Using a sed command, print all cars between the first chevy and the first bmw cars. 4. Using a sed command, replace and print all occurrences of chevy to Chevrolet. 5. Using a sed command, add a line of 20 dashes after each line. 6. Using a sed command, delete all ford cars. 7. Using a sed command, add .00 to all the numbers in the last column. 8. Using an awk command, print first and last columns only with last column printed first. 9. Using an awk command, count the number of ford cars and print that number. 10. Using an awk command, add a header line with Make, Model, Year, K Miles, and Price aligned with the columns followed by a dashed line and then all of the data in the file with the following changes: the last column includes a $ sign followed by the number expressed as a floating point number with two digits following the decimal point i.e., 2500 appears as $2500.00, and so on.
testfile1.txt
plym fury 1970 73 2500 chevy malibu 1999 60 3000 ford mustang 1965 45 10000 volvo s80 1998 102 9850 ford thundbd 2003 15 10500 chevy malibu 2000 50 3500 bmw 325i 1985 115 450 honda accord 2001 30 6000 ford taurus 2004 10 17000 toyota rav4 2002 180 750 chevy impala 1985 85 1550 ford explor 2003 25 9500
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started