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



Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / ripu

grep ^...$ <filename>

Is This Answer Correct ?    61 Yes 8 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / leo

grep ^...$ <filename>

Is This Answer Correct ?    24 Yes 3 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / manoj kumar kar

grep ^...$ <filename>

Is This Answer Correct ?    12 Yes 4 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / usama el far

grep -n root /etc/passwd|cut -f1 -d:

Is This Answer Correct ?    5 Yes 1 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / ramesh

grep "^...$" <file name>

Is This Answer Correct ?    4 Yes 1 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / khushi

grep '\<...\>' filename

Is This Answer Correct ?    4 Yes 1 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / rajasekar utl

grep ^...$ <filename>

Is This Answer Correct ?    4 Yes 2 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / saravan

grep -w [a-zA-Z][a-zA-Z][a-zA-Z] <filename>

Is This Answer Correct ?    4 Yes 3 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / satyawan

grep -n '\w{3}' <filename>

Is This Answer Correct ?    2 Yes 1 No

Write a grep (or grep) command that selects the lines from a file that have exactly three characte..

Answer / chintalapudi

grep -x '^???$' <filename>

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

what is the use of wild cards?

2 Answers  


By using which command we can find the CPU utilization time?

7 Answers   Amazon,


Which command should you use to find the remaining disk space in unix server?

0 Answers  


What is ‘ps’ command for?

0 Answers  


What do chmod, chown, chgrp commands do?

0 Answers  






What is file system in unix??

10 Answers   Symphony,


What is the use of touch command in there?

1 Answers   Accenture,


what is the use of "test" command in unix?

4 Answers  


What is the significance of the 'tee' command?

0 Answers  


How to get a particular string as your prompt ? Give syntax of that command?

3 Answers  


how to find the 51th record of a file containing 100 records in unix.

12 Answers   IBM,


What does this command do,"$more readme.txt“?

0 Answers  


Categories