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 / susanta polley

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

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you repeat a command in terminal?

874


What are grep patterns?

795


Give the command for finding the current date.

794


Differentiate cat command from more command.

817


What is unix command line?

850


What is the functionality of a top command?

859


What do chmod, chown, chgrp commands do?

932


What is rmdir command?

820


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

947


What does find command return in unix?

880


What does this command do,"$more readme.txt“?

897


How does pipe () work?

818


How do you grep recursively?

801


When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

2001


What does the “echo” command do?

870