Just to be contrary ;)

A one time investment of 2 minutes (I did have to scrounge in contrib
to locate these after all):

(defn make-stupid-simple-script [f content]
  (spit f content)
  (sh "chmod" "755" (.getName f)))

for the eternal pleasure of using:

user=> (make-stupid-simple-script (File. "/usr/local/www/apache22/cgi-
bin/hello-world.sh") "#!/bin/sh\n
echo 'Content-type: text/plain\\n'
echo Hello World")

Feel free to take this and run with it :)

On Sep 9, 9:47 am, Mike Meyer <mwm-keyword-googlegroups.
620...@mired.org> wrote:
> On Thu, 9 Sep 2010 16:28:48 +0100
>
> Edmund Jackson <edmundsjack...@gmail.com> wrote:
> > Hi Mike,
>
> >     Could you perhaps present a counter-example of greater simplicity ?
>
> $ cat - > /usr/local/www/apache22/cgi-bin/hello-world.sh
> #!/bin/sh
>
> echo 'Content-type: text/plain\n'
> echo Hello World
> ^D
> $ chomd 755 /usr/local/www/apache22/cgi-bin/hello-world.sh
>
> Done. Three lines of source code. 0 lines of framework setup. 1 tool
> (sh). Pretty much the same thing works for python, perl, etc.  It's
> about as robust as can be asked for - that's the nature of
> apache. Performance is going to be mediocre at best. That's the
> trade-off for simplicity.
>
>       <mike
> --
> Mike Meyer <m...@mired.org>          http://www.mired.org/consulting.html
> Independent Network/Unix/Perforce consultant, email for more information.
>
> O< ascii ribbon campaign - stop html mail -www.asciiribbon.org

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to