Question: Lets consider the file with the following content Linux,20 Unix,30 AIX,25 Linux,25 Solaris,10 HPUX,100 Sort the file Sort the file on the basis of the
Lets consider the file with the following content
Linux,20 Unix,30 AIX,25 Linux,25 Solaris,10 HPUX,100 |
Sort the file
Sort the file on the basis of the first field
Sort the file on the bases of the second field
Sort the file on the basis of the second filed numerically
Sort and remove duplicated from the file based on the first field
Sort numerically and remove duplicated from the file based on the second field
Sort the file alphabetically on the first field, numerically on the second field.
sed
Consider a file named myfile.txt. Write sed command to acomplish the following tasks
Return lines 5 through 10 from the myfile.txt file.
View the entire file except lines 20 through 35.
Display lines 5 through 7 and 10 through 13 using one sed command
Replace every instance of the word "version" with "story"
Replace every instance of the word "version" with "story" ignoring character case
Replace the word "version" with "story" only in lines 30 through 40
Show lines that start with "July 2"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
