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

How do I run a whois command?

596


Which command will print your home directory on screen?

540


Can you enlist some commonly used network commands?

598


What does grep v grep do?

548


What is the command to find maximum memory taking process on the server?

668






What is the use of the command 'ls -x chapter[1-5]' ?

659


What is the significance of the 'tee' command?

594


What is merge command in unix?

942


What does awk stand for?

603


What does the command '$ls | wc –l > file1' do?

677


Why is it called grep?

557


What command is used to check the current users?

592


What is the use of tee command?

567


Describe the zip/unzip command using gzip.

608


Who wrote grep?

577