Question: A user of Linux operating system has created a file F with below data in the file and now he want to filter some data
A user of Linux operating system has created a file F with below data in the file and now he want to filter some data using various shell commands. Give the appropriate commands required by the user to get his results. [Assume spaces between fields are uneven] 5 KIA BMW 2. Korea Germany Germany 1 Mercedes Renault 3 France 4 Toyota Japan 6 Audi Germany 7 Honda Japan a.) Write a command to print only last column in sorted order and remove duplicates (0.5) b.) Write a command to print only the car names belongs to Germany.[1] c.) Write a command to edit the file and to replace the word Mercedes with Benz. [1] d.) Write the command to print any one car made by Germany and one car made by France[0.5]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
