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

Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

713


what is the advaantage of each user having its own copy of the shell?

2149


Which command is used to delete all files in the current directory and all its sub-directories?

770


Who command in unix?

682


What does 'mkdir' command do in UNIX?

764






Write a command to kill the last background job?

704


How do I run a bash script?

671


What is the use of the tee command?

692


What is the difference between cat and more command?

759


Which command is used to kill the last background job?

886


How do I search a whole word in vim?

773


Describe the usage and functionality of the command rm –r * in unix?

921


What does find command return in unix?

695


What is the use of finger command?

683


What is s and g in sed command?

651