Quote:
Originally posted by pcardout
[B]I'm more of a newbie than the last guy, so I can
make it simpler. I'm sure he's right, but it's too
much of a scripting tour de force to read it!
|
Heh - it's not that hard ... the only half-way
complex thing is this bit:
Code:
tail -n $((`ls -1 *txt | wc -l` -1 ))
determine the number of files, and subtract one,
which I do to only get the "oldest" entries in tail...
the
gives you all entries sorted by date, newest first
(thus in the first line). With the tail-bit I cut-off the
newest one. And with the xargs gzip the older
ones get zipped individually, which is exactly what
the fellow had asked for.
Cheers,
Tink