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

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

16 Answers  


What does this command do? Cat food 1 > kitty

0 Answers  


what is the use of ls -l command & what is the information it gives about user ?

5 Answers  


What difference between cmp and diff commands?

0 Answers  


Differentiate cmp command from diff command.

0 Answers  






what are wild cards?

2 Answers  


how will you convert a general file to a hidden file?

4 Answers  


what does a process mean?

7 Answers   Infosys,


What does find command return in unix?

0 Answers  


What is ‘ps’ command for?

0 Answers  


how to unzip the contents of the gzip file

1 Answers   Epsilon,


What is the command to find maximum memory taking process on the server?

0 Answers  


Categories