what is the cmd to remove the comment lines from a file and
to display the original text without comments?
thanks in advance......

Answer Posted / deepak

sed -e 's/^#//g' -e 's/#//g' input_filename > output_filename


Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are reported commands?

560


Explain command to display different lines that are found when compare two files?

674


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

585


What is the behavioural difference between cmp and diff commands?

670


Which command is used to kill the last background job?

769






Describe the zip/unzip command using gzip.

604


What are bash commands?

588


What is the unix command to confirm a remote host is alive or not?

575


How to use grep command to list find the records of a file containing 10 different strings?

643


Which command will print your home directory on screen?

540


What does #!/ Bin sh do?

582


What is a command and examples?

575


What is the use of sed command in unix?

588


What are the dos commands?

642


What is .sh file?

614