Subj : binktrim in rebol, again To : All From : tony summerfelt Date : Sat Apr 03 2004 12:38 pm here's the binktrim in rebol again. this time it will take command line arguments. to give you an idea of how asbolutely loud the documentation sucks: it took me 4 hours to get the information i needed to write 4 of the lines. i have 'the official rebol guide'. it's over 700 pages, but there's not one mention of how to get command line arguments to a program. the online documentation has no mention of it either. once again i had to sift through 536 example programs in the 'rebol script library' to find what i was looking for. you're probably wondering what the advantage of rebol is. well size and resources as i mentioned last message. but the biggest is that with addition of 5 more lines code you can have the trimmed lines sent to you in email every hour (or whatever time span you want). also this code runs unchanged on whatever platform is supported by rebol (somewhere between 37 and 50 different platforms) i wouldn't suggest rebol for any general programming. unless you really know the language there's nothing quick and dirty about it, unless it's net related it takes about 6 lines to check a web page and email it to you if it changed at all. that's pretty hard to beat... ========================================================================== REBOL [] either not system/script/args == none [ arg: system/script/args arg: parse arg "" log: to-file arg/1 binkd-log: read/lines log days: to-integer arg/2 ][ print "" print "usage: " print "" ask "hit enter:" quit ] forall binkd-log [ line: first binkd-log line: parse/all line " " date: pick line 2 if date <> none [ month: pick line 3 time: pick line 4 date-time: join date ["-" month "-" now/year "/" time now/zone] date-time: to-date date-time line: rejoin [form line newline] if (now - date-time) < days [write/append %binkd.trimmed line] ] ] if exists? log [delete log] rename %binkd.trimmed log if exists? %binkd.trimmed [delete %binkd.trimmed] ========================================================================== --- GoldED/spleen 3.0.1+ * Origin: ventedspleen.dyndns.org (1:249/100) .