Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



what is the cmd to remove the comment lines from a file and to display the original text without c..

Answer / sandip

sed '/^#/d' filename

Is This Answer Correct ?    9 Yes 6 No

what is the cmd to remove the comment lines from a file and to display the original text without c..

Answer / srividya

sed '/^#/ d'

Is This Answer Correct ?    6 Yes 4 No

what is the cmd to remove the comment lines from a file and to display the original text without c..

Answer / susanta polley

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

Is This Answer Correct ?    4 Yes 2 No

what is the cmd to remove the comment lines from a file and to display the original text without c..

Answer / deepak

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


Is This Answer Correct ?    6 Yes 5 No

what is the cmd to remove the comment lines from a file and to display the original text without c..

Answer / giri

grep -v '#' input_filename > output_filename

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Unix Commands Interview Questions

What is the first character of the output in ls l command?

0 Answers  


What is the output of : $ ps-e $ ps-a commands

5 Answers   IBM,


which command is used to change group?

5 Answers  


how many internal commands is there in UNIX?

3 Answers   TCS, Virtusa,


What is updatedb?

0 Answers  


What is awk command used for?

0 Answers  


What are file permissions in Unix, and how are they represented?

2 Answers  


How do you remove a directory?

1 Answers  


What does 'mkdir' command do in UNIX?

0 Answers   Syntel, Visa,


What command would users use to see what file one page at a time in UNIX?

7 Answers   IBM,


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

0 Answers  


Explain ‘library functions’ with respect to unix commands?

0 Answers  


Categories