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 |
distinguish between interrupts and exceptions?
what is the cmd to display the last exit status in UNIX?
How to find the files that are accessed before 10 minutes?
Is it inbetween or in between?
How to get a particular string as your prompt ? Give syntax of that command?
Which command is used to find whether the system is 32 bit or 64 bit?
What is the comma to show the space allocation of files?
what is Online(STM) and offline diagnostics in HP-UX?
Assume that a file’s permissions give you read and write access. What operations can you perform on the file if it is in a directory which has “r”(read) only process? What operations can you perform on the file if it is in a directory which has “x”(execute) only access?
How to display no of records in oracle using unix command?
Which unix command to make a new directory?
How do you create a file in UNIX
36 Answers Accenture, EMG, Nokia, QA, TD,