: ‘a growing collection of the Unix tools that nobody thought to write long ago, when Unix was young.’ these are really, really nifty (via popey)
(tags: via:popey unix cli command-line linux moreutils sponge pee ts vipe zrun perl for:pixelbeat)
sponge is quite handy, and is equivalent to method 6 here: http://www.pixelbeat.org/docs/unix_file_replacement.html
I use xargs -P instead of parallel,
iconv -futf8 -tutf8 instead of isutf8,
join/uniq instead of combine
FreeBSD has lockf as a command line utility (since 1997), though I sometimes wish cron had a builtin locking feature to prevent multiple instances running at the same time. I’ve seen a few things like ts before, but it should be a standard.
Oh http://www.freebsd.org/cgi/man.cgi?query=lockf is cool. I’ve needed that functionality in the past and had used a less robust script:
and needless to say I had my own mutex locking script, too ;)
I should mention (for google) that lckdo is the moreutils util related to locking.
I also noticed the lockfile command which is part of procmail on my fedora 14 system.
Also today I noticed the lockfile-progs package (via http://twitter.com/jacobian/statuses/37927174136803328 )
“lckdo”! what an incomprehensible/unintuitive name. :( Still, good to know it’s there, although relatively recently — my RHEL5 work desktop doesn’t have it.