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 / giri

grep -v '#' input_filename > output_filename

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find previous commands in unix?

860


What is nr in awk command?

829


What is grep command in unix with examples?

887


Who command in unix operating system?

892


How does shebang work?

834


What is used to type command?

788


What is the function of grep command in unix?

841


What are the unix commands?

785


What is the use of tee command?

821


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

854


What command is used to switching between users in unix?

808


Does cp command overwrite files?

869


Is command prompt unix?

830


Which command is used to kill the last background job?

1053


Explain command to show the space allocation of files?

868