Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Explain about the slow execution speed of shells?

0 Answers  


What does chmod do?

0 Answers  


one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

0 Answers  


I have 2 files and I want to print the records which are common to both.

0 Answers  


How would you print just the 25th line in a file using smallest shell script?

4 Answers  






What command needs to be used to take the backup?

0 Answers  


What language is shell scripting?

0 Answers  


What does it mean to debug a script?

0 Answers  


What is awk in shell script?

0 Answers  


Is it possible to substitute "ls" command in the place of "echo" command?

0 Answers  


HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL SHELL SCRIPT?

3 Answers   Patni,


What is inside a seashell?

0 Answers  


Categories