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 given between the fields are uneven] 1 Nizwa Oman 2 Hyderabad India on 3 Muscat Oman India Bombay Karachi Pakistan 6 Izki Oman 7 Delhi India a.) Write a command to print only cities of India[1] b.) Write a command to print only: Izki [1] Muscat c.) Write a command to print cities of Oman and Pakistan.[1] d.) Write the command to count number of cities of Oman (0.5) e. Write a command to print only country names in sorted order without duplicates[0.5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
