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 significance of the 'tee' command?

0 Answers  


Which command is used to restrict incoming messages?

0 Answers  


What's a command word?

0 Answers  


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

0 Answers  


Is it inbetween or in between?

0 Answers  






How to get a particular string as your prompt ? Give syntax of that command?

3 Answers  


How to remove a crontab file?

2 Answers  


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

11 Answers   Polaris,


How do I open a port?

0 Answers  


Where LOG fiels resides in AIX and pls tel me how to remove the log file

6 Answers   Vestas,


What is an Unix command to convert HEX value to ASCII value located in any flat file.

2 Answers  


What command is used to check the current users?

0 Answers  


Categories