Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Alternative Operating Systems > Batch-add files to cat?

Batch-add files to cat?
Thread Tools
Jacke
Grizzled Veteran
Join Date: Dec 2000
Location: Finland
Status: Offline
Reply With Quote
Feb 11, 2007, 06:47 AM
 
I've got a number of sequentially named files that I want to cat together, but dragging them one by one onto the Terminal is a bit of a drag... Is there any way I can batch-add them, e.g. "cat file.ext.[001-095]"?
     
WJMoore
Grizzled Veteran
Join Date: Jan 2002
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 11, 2007, 09:27 AM
 
cd directory_with_files
cat file.ext.* > destinationfile
will do the trick, assuming only the numbered parts will match the wildcard.
     
Jacke  (op)
Grizzled Veteran
Join Date: Dec 2000
Location: Finland
Status: Offline
Reply With Quote
Feb 11, 2007, 04:12 PM
 
Thanks, that worked great!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:35 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,