On 2013-02-13 12:27, Tim Daneliuk wrote:
> I know how to do this in Python, but I really want to do it in
> straight Bourne shell. I have some ideas, but I thought I'd
> give you folks a crack at this Big Fun:
>
> a) You have a directory of files - say they're logs - generated
> at nondeterm
On Wed, Feb 13, 2013 at 03:13:06PM -0600, Robert Bonomi wrote:
>
> here's a one-liner:
> rm ` \
> stat -f "%SB %B %N" * \
> | sort -k5nr \
> | cut -c1-7,17-20,32- \
> | awk 'BEGIN {a="";b=0;c=0} $1==a && $2==b && $3=c {print
> $4;}{a=$1;b=$2;c=$3}' \
I'm never comfortable calling something
On 02/13/2013 03:13 PM, Robert Bonomi wrote:
Date: Wed, 13 Feb 2013 12:27:31 -0600
From: Tim Daneliuk
Subject: Fun Scripting Problem
I know how to do this in Python, but I really want to do it in
straight Bourne shell. I have some ideas, but I thought I'd
give you folks a crack at thi
>> On Wed, 13 Feb 2013 12:53:32 -0600,
>> Tim Daneliuk said:
T> The only way to determine the date of the file is by looking at its stat
T> info. There is nothing the file name or content that could be used to
T> infer this.
Being a pedantic twit, I interpreted "stat info" to mean "info you
> Date: Wed, 13 Feb 2013 12:27:31 -0600
> From: Tim Daneliuk
> Subject: Fun Scripting Problem
>
> I know how to do this in Python, but I really want to do it in
> straight Bourne shell. I have some ideas, but I thought I'd
> give you folks a crack at this Big Fun:
&g
Tim Daneliuk writes:
> On 02/13/2013 12:38 PM, Teske, Devin wrote:
>> (apologies for top-post)
>>
>> As tempted as I am, I think newsyslog(8) may be what you want.
>>
>> Missing information in your post is how you intend to timestamp the
>> files -- by filename? by content? If by-content, then is
On 02/13/2013 12:38 PM, Teske, Devin wrote:
(apologies for top-post)
As tempted as I am, I think newsyslog(8) may be what you want.
Missing information in your post is how you intend to timestamp the files -- by
filename? by content? If by-content, then is it a good assumption that the data
i
behalf of Tim Daneliuk [tun...@tundraware.com]
Sent: Wednesday, February 13, 2013 10:27 AM
To: FreeBSD Mailing List
Subject: Fun Scripting Problem
I know how to do this in Python, but I really want to do it in
straight Bourne shell. I have some ideas, but I thought I'd
give you folks a crack
I know how to do this in Python, but I really want to do it in
straight Bourne shell. I have some ideas, but I thought I'd
give you folks a crack at this Big Fun:
a) You have a directory of files - say they're logs - generated
at nondeterministic intervals. You may get more than one a day,