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:
Fri, 25 Apr 2008 06:45:47 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
Thanks, Mark.

On Apr 24, 2008, at 11:19 PM, Mark Lively wrote:

> On Apr 24, 2008, at 11:12 PM, David Livesay wrote:
>
>> 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.
>>
> cat notes-* > notes
>
> -Mark

ATOM RSS1 RSS2