On 2013-02-13 12:27, Tim Daneliuk tun...@tundraware.com 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
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 like that a
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
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 at this Big Fun
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
Tim Daneliuk tun...@tundraware.com 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
Date: Wed, 13 Feb 2013 12:27:31 -0600
From: Tim Daneliuk tun...@tundraware.com
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:
a) You have
On Wed, 13 Feb 2013 12:53:32 -0600,
Tim Daneliuk tun...@tundraware.com 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
On 02/13/2013 03:13 PM, Robert Bonomi wrote:
Date: Wed, 13 Feb 2013 12:27:31 -0600
From: Tim Daneliuk tun...@tundraware.com
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