emacs.d/clones/lisp/www.cliki.net/Unix shell scripting.html

84 lines
5.2 KiB
HTML
Raw Normal View History

2022-10-07 15:47:14 +02:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: Unix shell scripting</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=Unix%20shell%20scripting">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - Unix shell scripting</span>
<div id="content"><div id="content-area"><div id="article-title">Unix shell scripting</div><div id="article">This is a guide for writing <a href="Unix.html" class="category">Unix</a> shell scripts in various Common Lisp implementations.<p><a href="roswell.html" class="internal">roswell</a> is a Lisp implementation installer/manager, script launcher and more. It has many features that makes it easy to test, share, and distribute your Lisp applications.<p><a href="cl-launch.html" class="internal">cl-launch</a> is a self-contained shell-script that will abstract away the details of the underlying Lisp implementation by generating the proper Lisp and shell code. Access to command line arguments, quitting, etc., can then be done portably using <a href="uiop.html" class="internal">uiop</a> or <a href="clon.html" class="internal">clon</a>. For instant startup of all your scripts, you'll probably want to dump a multicall binary image, which you can do using <a href="cl-launch.html" class="internal">cl-launch</a> and <a href="roswell.html" class="internal">roswell</a>. See <a href="http://fare.livejournal.com/184127.html">Common Lisp as a Scripting Language, 2015 edition</a>.<p>
If you insist on doing things manually and not portably, here is some information for invoking Lisp source files as shell scripts for a few particular Common Lisp implementations:
<table>
<tr>
<th>Implementation</th>
<th>Shebang invocation</th>
<th>Command-line arguments</th>
<th>More info</th>
</tr>
<tr>
<td><a href="CLISP.html" class="internal">CLISP</a></td>
<td><tt>#!/usr/local/bin/clisp</tt></td>
<td><tt>EXT:*ARGS*</tt></td>
<td><a href="http://www.clisp.org/impnotes/quickstart.html#quickstart-unix">CLISP quickstart delivery</a></td>
</tr>
<tr>
<td><a href="ECL.html" class="internal">ECL</a></td>
<td><tt>#!/usr/local/bin/ecl -q -norc -shell</tt></td>
<td><tt>(si:argc), (si:argv N)</tt></td>
<td><a href="http://manpages.ubuntu.com/manpages/trusty/man1/ecl.1.html">ecl(1) manual page</a></td>
</tr>
<tr>
<td><a href="GCL.html" class="internal">GCL</a></td>
<td><tt>#!/usr/local/bin/gcl -f</tt></td>
<td><tt>si:*command-args*</tt></td>
<td><a href="http://manpages.ubuntu.com/manpages/trusty/man1/gcl.1L.html">gcl(1) manual page</a></td>
</tr>
<tr>
<td><a href="SBCL.html" class="internal">SBCL</a></td>
<td><tt>#!/usr/local/bin/sbcl --script</tt></td>
<td><tt>sb-ext:*posix-argv*</tt></td>
<td><a href="http://www.sbcl.org/manual/#Shebang-Scripts">SBCL manual section 3.1.3</a></td>
</tr>
</table><p>Other topics: <a href="deployment.html" class="category">deployment</a></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="Unix&#32;shell&#32;scripting.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=Unix%20shell%20scripting">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=Unix%20shell%20scripting">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=Unix%20shell%20scripting&amp;from-revision=3708078467">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>