Write a grep (or grep) command that selects the lines from
a file that have exactly three characters.
Answers were Sorted based on User's Feedback
Answer / saravan
Sorry use the below commands to get the exact word contains
3 char in the file.
grep -w "[a-zA-Z][a-zA-Z][a-zA-Z]" <filename>
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / jyoti pruthi
grep -n "..." <filename>
It will give u the lines that have only 3 characters with
line numbers. Here, "..." replace any 3 characters (single
dot represent single character).
Is This Answer Correct ? | 0 Yes | 1 No |
How do you repeat a command in terminal?
How to get the operating system's information in unix?
What command is used to replace the existing string with some other?
What is grep and how do you use it?
Write a grep (or grep) command that selects the lines from a file that have exactly three characters.
What is file system in unix??
How to create hardlinks and softlinks on files?
How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.
when we installing aix os the ssh installed default?
Give the command to display space usage on the UNIX file system.
What is the use of awk command in unix?
What UNIX command will control the default file permissions when files are created?