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 |
What is time_t?
How to find $ai_serual resolved path by using unix
how unix kernel distinguishes between a normal file and device file ?
7 Answers Google, IBM, McAfee, Vodafone,
What is the use of cut command in unix?
How do you grep a case insensitive?
What is the use of pipes?
Where can I get the free download of Unix by Yeswant Kanetkar?
Hi All, Can you please let me know how to grep for a particular pattern in unix. I want to print the dates from the file exp.txt. the date pattern is DD:MM:YYYY, I just want to print all the dates from the file exp.txt.
8 Answers Concentrix, IBM, Symantec, TCS,
what is the use of ls -l command & what is the information it gives about user ?
Give Command that will move a single file called "unix.txt"
How to get the operating system's information in unix?
Give Command that will change the name of a directly from paypal to eBay