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 mtime in find command?

1 Answers  


Write a grep (or grep) command that selects the lines from a file that have exactly three characters.

24 Answers   Mac, Nokia,


What does the command ' $who | sort –logfile > newfile' do?

0 Answers  


How to setup sudo, only can use for particular date & time only ( for solaris10 )

1 Answers   ups,


How do I delete files from command prompt?

0 Answers  


what is the cmd to display the last exit status in UNIX?

5 Answers   MEIT, Syntel,


What is clustering in HP and how it's work?

1 Answers   HP,


how to change a normal file into hidden file

3 Answers  


what is the use of wild cards?

2 Answers  


how to unzip the contents of the gzip file

1 Answers   Epsilon,


Which command can you use to find the currently running process in unix server?

0 Answers  


what is the command to get help on a UNIX terminal?

5 Answers  


Categories