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 is the function of grep command in unix?

0 Answers  


Describe the usage and functionality of the command rm –r * in unix?

2 Answers  


Using unix command how to display no of records in oracle?

0 Answers  


what does the 'tee' command do?

4 Answers  


When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?

3 Answers  


Is it inbetween or in between?

0 Answers  


what is Online(STM) and offline diagnostics in HP-UX?

2 Answers   HP,


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

0 Answers  


The command grep first second third /usr/you/myfile a) prints lines containing the words first, second or third from the file /usr/you/myfile b) searches for lines containing the pattern first in the files second, third, and /usr/you/myfile and prints them c) searches the files /usr/you/myfiel and third for lines containing the words first or second and prints them d) replaces the word first with the word second in the files third and /usr/you/myfile e) None of the above

4 Answers   IBM,


How do you find which version and name of unix you are using at the command prompt?

7 Answers  


Which command is used to create a directory?

0 Answers  


How do I search for text in vi?

0 Answers  


Categories