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 / sukumar

grep "???" <fileName>

Is This Answer Correct ?    3 Yes 9 No

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

Answer / giridhar tarare

grep -b "abc" <file_name>

Is This Answer Correct ?    2 Yes 10 No

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

Answer / sudhir kumar

sorry the command will be like below..

grep -x "abc" <file_name>

Regards,
Sudhir Kumar

Is This Answer Correct ?    6 Yes 17 No

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

Answer / sudhir

The command will be like this

grep -c "abd" <file_name>

This command gives you the line number which contain three
character.

Regrds,
Sudhir

Is This Answer Correct ?    6 Yes 18 No

Post New Answer

More Unix Commands Interview Questions

What does 'mkdir' command do in UNIX?

0 Answers   Syntel, Visa,


What is a command and examples?

0 Answers  


What are reported commands?

0 Answers  


why unix commands can be divided into internal and external commands?

3 Answers   Informatica,


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

12 Answers   IBM,






What are some command words?

0 Answers  


29. How to display top 10 users Who | head -10 | wc –w

4 Answers   TCS,


What does the metacharacter mean?

0 Answers  


what is virtual machine?

2 Answers   Infosys,


Which command is used to kill the last background job?

0 Answers  


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

0 Answers  


What is the command to check ports active in UNIX?

4 Answers   Accenture, IBM,


Categories