View Single Post
Old 02-23-2012, 01:41 PM   #9
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by cscat View Post
first non-knc1 poster here!
Can you please explain what this is all about, what is the purpose and use of it (like a very hands-on intro), all I perceive from it that it seems interesting but in all honesty I have close-to-0 clue what it is at all!!! Thanks dude.
Oh, I missed the chance for a brag -

Ever want to do "Declarative Programming"?
Ever want to do it in Bash?

Look at the script - it has a "Declarative Progamming" engine in it and this utitlity uses that to "solve" the problem of opening any combination of compressed files and archives.
Like that baby, it "learns as it goes" (and also remembers to record how to clean up after itself).

Don't be side-tracked by all the supporting functions - the entire program is three (3!) lines - just ignore the first 1200 lines or so of supporting functions, look at the bottom of the file.
To which I added a couple of lines to give a nice dump of all the problems encountered.

That is how it got into the ABS Guide back in 2003 (possibly dropped in newer versions).
It was a "Declarative Programming" extension to my chapter on using Bash arrays.

Last edited by knc1; 02-23-2012 at 01:51 PM.
knc1 is offline   Reply With Quote