Chris Lamb

Lamby's Second Postulate

Lamby's second postulate is, of course, don't use Perl unless absolutely necessary. For example, this 41-line script can easily be written as:

#!/bin/sh
while [ -n "$1" ]; do
   curl -F upload=@"$1" http://192.168.0.251/
   shift
done

Recursive file adding then achieved using the GNU findutils. Relax, it's the UNIX way.


Chris Lamb is a freelance software developer and the current Debian Project Leader. You can read other posts by me, see software I have written or read more about me. You can also follow me @lolamby.


Tags: GNU/Linux

Planets: WUGLUG UWCS

Tuesday 26th June 2007


Two comments

Comments are closed.