[TxMt] Re: Combining files?

jiho jo.irisson at gmail.com
Mon Jul 28 14:31:44 UTC 2008

On 2008-July-28  , at 10:20 , W. Thomas Leroux wrote:

> I have about 45 files I'd like to combine into one, and short of
> opening each one and copy & pasting it into the new one, I don't see a
> clear way to do this in Textmate.
> I'm certain there *is* a way, I'm just not seeing it.  Suggestions?

use a shell script. Assuming the 45 files are the only ones in a  

touch .newfile
for (( FILE in `ls *` )); do
   cat $FILE >> .newfile
mv .newfile newfile

NB: the first file has to have a point in front of the name so that it  
is not seen by ls and does not enter the loop


More information about the textmate mailing list