write grep commands to select the lines that have exactly
two characters

Answers were Sorted based on User's Feedback



write grep commands to select the lines that have exactly two characters..

Answer / arun

grep "^..$" filename

Is This Answer Correct ?    76 Yes 16 No

write grep commands to select the lines that have exactly two characters..

Answer / yogita

grep '^..$' a.txt

Is This Answer Correct ?    12 Yes 6 No

write grep commands to select the lines that have exactly two characters..

Answer / ankita

grep '^..$'

Is This Answer Correct ?    12 Yes 13 No

write grep commands to select the lines that have exactly two characters..

Answer / supriya

grep "..$" <filename>

Is This Answer Correct ?    4 Yes 5 No

write grep commands to select the lines that have exactly two characters..

Answer / amaresh

grep '^..$' filename

Is This Answer Correct ?    8 Yes 10 No

write grep commands to select the lines that have exactly two characters..

Answer / sanjeev

grep a? filename

Is This Answer Correct ?    2 Yes 8 No

write grep commands to select the lines that have exactly two characters..

Answer / mr. manindra nayak

grep -w "^..&" filename

Is This Answer Correct ?    1 Yes 7 No

write grep commands to select the lines that have exactly two characters..

Answer / mr. manindra nayak

grep -w '^..$' filename
or grep '[a-z][a-z]' filename
or grep '[A-Z][A-Z]' filename

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More Unix Commands Interview Questions

what is the command to print last 8 lines of any text file.

10 Answers  


How to display a file name which has zero bytes in size.

11 Answers   Polaris,


what is tar command and what are the different types of tar commands?

5 Answers  


what is the default signal kill in unix?

8 Answers   IBM,


How do you copy a directory with many files and folders into another directory?

2 Answers  


what is shell?

5 Answers  


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

2 Answers   HP,


Give the command to display space usage on the UNIX file system.

6 Answers  


Is it inbetween or in between?

0 Answers  


what is the command to list files in a directory in UNIX?

8 Answers  


What command a user use to view a long text file one page at a time in UNIX?

8 Answers   IBM,


What is awk good for?

0 Answers  


Categories