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 are reported commands?

0 Answers  


What is the use of cut command in unix?

0 Answers  


what is the use of "test" command in unix?

4 Answers  


How to display no of records in oracle using unix command?

0 Answers  


What is file system in unix??

10 Answers   Symphony,






Differentiate cat command from more command.

0 Answers  


What Command is used to make a directory?

4 Answers   IBM,


How to rename files and folders?

7 Answers   IBM, Oracle,


What command will bring user back to their home directory in UNIX?

13 Answers   IBM, Wipro,


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 s and g in sed command?

0 Answers  


What is awk used for?

0 Answers  


Categories