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 ?    6 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 a bash command?

0 Answers  


Write a command to kill the last background job?

0 Answers  


how will you convert a general file to a hidden file?

4 Answers  


What is "type" command in unix?what is the functionality??

2 Answers  


boot process?

2 Answers   Atos Origin, Wipro,


How to find and replace the below command?

2 Answers   HCL,


What is the protocol for PING command?

1 Answers   IBM,


Which command can you use to find the currently running process in unix server?

0 Answers  


what are the different hardwares available?

1 Answers  


Why is it called grep?

0 Answers  


How do I delete files from command prompt?

0 Answers  


How to setup sudo, only can use for particular date & time only ( for solaris10 )

1 Answers   ups,


Categories