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

Answer Posted / junhua

sed -n '/^$/p' file

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does .sh file contain?

543


What is batch file programming?

687


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

5187


What are the various stages of a linux process it passes through?

622


How does path variable work?

537






‎What is a shell? · ‎Types of shell · ‎what is shell scripting?

543


What happens when you type ls?

553


What are the two files of crontab command?

648


What is console line?

561


Write a command sequence to find all the files modified in less than 2 days and print the record count of each.

921


Why do we write bin bash in shell scripts?

539


What is shell application?

563


How to set an array in linux?

579


Why is the use of shell script?

533


How do I run a powershell script?

564