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

3 Answers  


how to find largest file?

14 Answers   HCL, Microsoft, Thomson Reuters,


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,


what is the command to find out which shell you are running?

14 Answers  


How do I clear my terminal history?

0 Answers  






Explain iostat, vmstat and netstat.

3 Answers   CTS, Wipro,


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  


Why we are using UNIX OS when we are doing the testing in our application?

5 Answers   IBM,


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

12 Answers   IBM,


Which command should you use to find the remaining disk space in unix server?

0 Answers  


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

2 Answers   HP,


Which unix command lists files/folders in alphabetical order?

0 Answers  


Categories