Combine TXT Files
-
Does anyone know of a utility (free or shareware), or of a way to combine several txt files into one file ignoring all comments in each file? ie: //comment file 1 # comment file 1 ; comment file 1 include this! //comment file 2 # comment file 2 ; comment file 2 and include this! the resulting file would contain: include this! and include this! Thanks! Frank
-
Does anyone know of a utility (free or shareware), or of a way to combine several txt files into one file ignoring all comments in each file? ie: //comment file 1 # comment file 1 ; comment file 1 include this! //comment file 2 # comment file 2 ; comment file 2 and include this! the resulting file would contain: include this! and include this! Thanks! Frank
Sounds like about an hours work. Why don't you write one ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Sounds like about an hours work. Why don't you write one ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002Public enemy no. 1 for the lazy man as ever :-)
We brought out this new and very similar version of our expensive software because the old version was......old....It's a good enough excuse for Microsoft so its fine for us.
-
Sounds like about an hours work. Why don't you write one ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Sounds like about an hours work. Why don't you write one ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Does anyone know of a utility (free or shareware), or of a way to combine several txt files into one file ignoring all comments in each file? ie: //comment file 1 # comment file 1 ; comment file 1 include this! //comment file 2 # comment file 2 ; comment file 2 and include this! the resulting file would contain: include this! and include this! Thanks! Frank
Perl[^] is your friend. :) Jon Sagara Working with a database is iterative, like sex, but painful instead of pleasurable. -- Marc Clifton[^]
-
Christian Graus wrote: Sounds like about an hours work. Why don't you write one ? Looking for an easy way out. Not to mention the fact that my file i/o programming ability is not the greatest in the world. :-O Frank
-
Christian Graus wrote: Sounds like about an hours work. Why don't you write one ? Looking for an easy way out. Not to mention the fact that my file i/o programming ability is not the greatest in the world. :-O Frank
That's fair. Here's a great chance to improve it then !!! Seriously, read some iostream articles ( I have a few ) and then if you get stuck, post some questions. I'll be around for a few hours yet. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
A good opportunity to learn :)
Angels banished from heaven have no choice but to become demons Cowboy Bebop
-
That's fair. Here's a great chance to improve it then !!! Seriously, read some iostream articles ( I have a few ) and then if you get stuck, post some questions. I'll be around for a few hours yet. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
A good opportunity to learn :)
Angels banished from heaven have no choice but to become demons Cowboy Bebop
My sentiment exactly. Although I try to contrive projects that will teach me stuff, there is no substitute for actually having a use for the end product. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Does anyone know of a utility (free or shareware), or of a way to combine several txt files into one file ignoring all comments in each file? ie: //comment file 1 # comment file 1 ; comment file 1 include this! //comment file 2 # comment file 2 ; comment file 2 and include this! the resulting file would contain: include this! and include this! Thanks! Frank
perl -ni.bak -e 'print unless m!^//! or /^#/ or /^;/;' file1.txt file2.txt > bigfile.txt
:cool: Yes, that is actual Perl, not line noise... although it is hard to tell them apart at first. --Mike-- I'm bored... Episode I bored. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
perl -ni.bak -e 'print unless m!^//! or /^#/ or /^;/;' file1.txt file2.txt > bigfile.txt
:cool: Yes, that is actual Perl, not line noise... although it is hard to tell them apart at first. --Mike-- I'm bored... Episode I bored. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
Does anyone know of a utility (free or shareware), or of a way to combine several txt files into one file ignoring all comments in each file? ie: //comment file 1 # comment file 1 ; comment file 1 include this! //comment file 2 # comment file 2 ; comment file 2 and include this! the resulting file would contain: include this! and include this! Thanks! Frank
Um, hi, grep ? Oh yeah, Winshit. - Jason (SonorkID 100.611) The Code Project - Orange makes the art grow fonder
-
perl -ni.bak -e 'print unless m!^//! or /^#/ or /^;/;' file1.txt file2.txt > bigfile.txt
:cool: Yes, that is actual Perl, not line noise... although it is hard to tell them apart at first. --Mike-- I'm bored... Episode I bored. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm
RE's are fun! :cool:
Bruce Duncan, CP#9088, CPUA 0xA1EE, Sonork 100.10030
I can levitate birds...