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 pid?

4 Answers  


Give a regular expression that finds two things, try to come up with regular expressions that find each individually using "egrep" command?

5 Answers  


How to redirect standard error to a file?

2 Answers  


What are file commands?

0 Answers  


in UNIX,what is the command to remove directory with files?

10 Answers  


What command will change your prompt to myprompt?

0 Answers  


Explain mount and unmount command.

0 Answers  


in UNIX ,What is the command to view contents of a large error log file?

7 Answers  


what is the cmd to display the last exit status in UNIX?

5 Answers   MEIT, Syntel,


hi i have directories within the directory. Now i want to copy the directory along with all directories included in it to one location by using copy command? what is the command

2 Answers   ACS, Span Systems,


How we will execute previous command in vi editor?

8 Answers   Infosys,


What command would users use to see what file one page at a time in UNIX?

7 Answers   IBM,


Categories