MACSCRPT Archives

April 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Livesay <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 24 Apr 2008 23:12:20 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (20 lines)
Dear Scripters,

I'd like to concatenate a bunch of files in a directory, in  
sequential order. Since the files' names start with the same  
characters, and end in dates, I can get a nice, ordered file list  
from the ls command. What I'd like to do is to pipe this file list to  
cat in such a way that it will concatenate the files, not just the  
names.

The filenames look like this:

notes-20080401, notes-20080402, notes-20080403, notes-20080404,  
notes-20080405, etc.

And what I'd like to do is something like this:

ls notes-* | [??] | cat > notes

The [??] is the part I can't figure out.

ATOM RSS1 RSS2