Tuesday, April 24, 2012

Any other form of existence doesn’t interest me.

I'm doing up thing at work that features a little shell scripting, a lot of Kermit: glue to do a thing with free tools that the big expensive EDI application can't do for itself.

After hours of gazing at complete but scattered kermit docs, examples, source code, I was able to very carefully type the meat of my script.

rename /replace:{{}{\%6-\%7}{^}} \m(filename) \%4

This is the watershed.  It's all downhill from here.

Now the shell script can iterate over a text file, pass variables to the kermit script which contains that painfully wrought line above.

kermitget.sh ftp.blah.com user password destination store prefix date-time

And all kinds of crazy Turing-stuff will happen. 

A three-line function will call a 20-line Kermit script, process hundreds of customer names, thousands of files.  Data flies into EDI which sends it to JDE which turns into orders, requests.  Things get built, shipped.  We make money.

Stuff happens.

"Meaningful Work or Death. Any other form of existence doesn’t interest me."


blog comments powered by Disqus