How will you list only the empty lines in a file (using
grep)?

Answers were Sorted based on User's Feedback



How will you list only the empty lines in a file (using grep)?..

Answer / guest

grep "^$" filename

Is This Answer Correct ?    23 Yes 3 No

How will you list only the empty lines in a file (using grep)?..

Answer / junhua

sed -n '/^$/p' file

Is This Answer Correct ?    11 Yes 3 No

How will you list only the empty lines in a file (using grep)?..

Answer / meeran

awk '/^$/' filename

Is This Answer Correct ?    7 Yes 2 No

How will you list only the empty lines in a file (using grep)?..

Answer / kiran penujuri

find . -size 0 -print

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More Shell Script Interview Questions

write a shell script to check whether all the directories in the path exist has read and write permission

1 Answers  


Is cmd a shell?

0 Answers  


Explain about return code?

0 Answers  


What exactly is a shell?

0 Answers  


Hi Friends, I am currently Undergoing Course On Testing.I am Planning To Keep Fake Resume.Can any One tell me the ways to Prepare i.e, Real Time experience For Manual Testing. With Regards, Vikram

1 Answers  


How to take input values from the user?

4 Answers  


How do I edit a .sh file?

0 Answers  


What are environment variables?

2 Answers  


Write a script to print the first 10 elements of fibonacci series.

0 Answers  


How Connect to a Database in Shell Programming?

4 Answers   Syntel,


What is k shell?

0 Answers  


What is inside a seashell?

0 Answers  


Categories