s c h e m a t i c s : c o o k b o o k

/ WebHome / Cookbook.ProcessUntarScriptExample

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

Scripting Example: Untar

Problem

You want to use Scheme to do something that you would normally do using a shell script.

Solution

PLT Scheme has a great deal of support for scripting-style functionality. To demonstrate some of these features, the following program was converted from this bash script. See the header comment for an explanation of this script.

500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)

The above program relies on some general routines which provide additional support for a few basic scripting-style operations, some of which have been very loosely modeled on features found in scsh. For the above script to run correctly, /usr/bin/scheme-sh should be a link to the mzscheme binary, and the following program should be saved as init.ss in a directory called plt/collects/script-lang/sh. (This triggers MzScheme's built-in script engine support.)

500 Can't connect to 127.0.0.1:8778 (connect: Connection refused)

Discussion

TODO.


Comments about this recipe

Needs more explanation.

Contributors

-- AntonVanStraaten - 10 Feb 2006

CookbookForm
TopicType: Recipe
ParentTopic: ProcessRecipes
TopicOrder: 999

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest