Question: Part-3 linux Use the cat command to create a file. Name of this file should be file1. Type a few sentences in this file. Save
Part-3 linux
- Use the cat command to create a file. Name of this file should be file1. Type a few sentences in this file. Save this file. Use the cat command one more time to display the content of file1.
- Use vi command to add more lines to this file so you can answer the rest of these questions that uses regular expressions and grep command.
- Select the lines from file file1 that have exactly three characters in them.
- Select the lines from file file1 that have at least three characters in them.
- Select the lines from file file1 that have three or less characters in them.
- Select the non-blank lines from the file file1.
- Select the lines from file file1 that start with a capital letter.
- Select the lines from file file1 that end with a period.
- Select the lines from file file1 that have the string unix.
- Select the lines from file file1 that end with the string unix.
- Select the lines from file file1 that have only the string unix.
- Select the lines from file file1 that have the pattern unix at least two times.
- Select the lines from file file1 that have the pattern unix and ends with unix.
- Copy file file1 on the screen, but delete the blank lines.
- Select the lines from file file1 that have a digit.
- Select the lines from file file1 that have at least two digits without any other characters in between.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
