haiku/docs/userguide/fur/bash-scripting.html
2020-02-09 17:12:40 -05:00

120 lines
8.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fur" xml:lang="fur">
<head>
<!--
*
* Copyright 2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Humdinger <humdingerb@gmail.com>
* Translators:
* Fabio Tomat
*
-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="robots" content="all" />
<title>Bash e Scripting</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
</head>
<body>
<div id="banner">
<div><span>User guide</span></div>
</div>
<div class="nav">
<div class="inner">
<ul class="lang-menu">
<li class="now"><img src="../images/flags/fur.png" alt="" /> Furlan</li>
<li><a href="../id/bash-scripting.html"><img src="../images/flags/id.png" alt="" />Bahasa Indonesia</a></li>
<li><a href="../ca/bash-scripting.html"><img src="../images/flags/ca.png" alt="" />Català</a></li>
<li><a href="../de/bash-scripting.html"><img src="../images/flags/de.png" alt="" />Deutsch</a></li>
<li><a href="../en/bash-scripting.html"><img src="../images/flags/gb.png" alt="" />English</a></li>
<li><a href="../es/bash-scripting.html"><img src="../images/flags/es.png" alt="" />Español</a></li>
<li><a href="../fr/bash-scripting.html"><img src="../images/flags/fr.png" alt="" />Français</a></li>
<li><a href="../it/bash-scripting.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
<li><a href="../hu/bash-scripting.html"><img src="../images/flags/hu.png" alt="" />Magyar</a></li>
<li><a href="../pl/bash-scripting.html"><img src="../images/flags/pl.png" alt="" />Polski</a></li>
<li><a href="../pt_PT/bash-scripting.html"><img src="../images/flags/pt_PT.png" alt="" />Português</a></li>
<li><a href="../pt_BR/bash-scripting.html"><img src="../images/flags/pt_BR.png" alt="" />Português (Brazil)</a></li>
<li><a href="../ro/bash-scripting.html"><img src="../images/flags/ro.png" alt="" />Română</a></li>
<li><a href="../sk/bash-scripting.html"><img src="../images/flags/sk.png" alt="" />Slovenčina</a></li>
<li><a href="../fi/bash-scripting.html"><img src="../images/flags/fi.png" alt="" />Suomi</a></li>
<li><a href="../sv_SE/bash-scripting.html"><img src="../images/flags/sv_SE.png" alt="" />Svenska</a></li>
<li><a href="../tr/bash-scripting.html"><img src="../images/flags/tr.png" alt="" />Türkçe</a></li>
<li><a href="../zh_CN/bash-scripting.html"><img src="../images/flags/zh_CN.png" alt="" /> 中文 [中文]</a></li>
<li><a href="../ru/bash-scripting.html"><img src="../images/flags/ru.png" alt="" />Русский</a></li>
<li><a href="../uk/bash-scripting.html"><img src="../images/flags/uk.png" alt="" />Українська</a></li>
<li><a href="../jp/bash-scripting.html"><img src="../images/flags/jp.png" alt="" />日本語</a></li>
</ul>
<span>
«  <a href="preferences.html">Preferences</a> 
::  <a href="contents.html" class="uplink">Contents</a> 
<!-- ::  <a href="filesystem-layout.html">Disposizion dal filesystem</a>  » -->
</span></div>
</div>
<div id="content">
<div>
<h1>Bash e Scripting</h1>
<p>Il "Scripting" e je la tecniche par rindi automatichis lis proceduris, scrivint adun i comants salvant dut su file di test, clamâts "script". Ogni volte che si eseguìs un script, i comants a vegnin elaborâts un daûr di chel altri come se a vignissin inserîts a man intal <a href="applications/terminal.html">Terminâl</a>.<br />
I Script a puedin variâ de semplice esecuzion di pôcs comants intun specific ordin a sofisticâts tocs di codiç che al risolf compits complicâts.</p>
<h2>
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="bash" name="bash">Bash</a></h2>
<p>Viodût che i script a fasin naturalmentri afidament su la shell che ju interprete, tu âs prime di familiarizâ cu la BASH che e ven doprade di Haiku. A son tantis risorsis in rêt viodût che e je une shell tant doprade. Un biel document al è chel di Johan Jansson: <a href="https://web.archive.org/web/20011205095723/http://www.beforever.com/bashtut.htm" class="printurl">Introduction to bash - a tutorial for bash under BeOS</a>.<br />
Il <a href="https://www.gnu.org/software/bash/manual/bash.pdf" class="printurl">Bash Reference Manual (PDF, 720 KiB)</a> e je une risorse ninine par jentrâ tai detais.</p>
<h2>
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="scripting-bible" name="scripting-bible">La bibie dal Scripting</a></h2>
<p>Dopo vê imparât cualchi nozion di base su ce mût lavorâ te shell, e je ore di fâti rilassâ intal mont dal scripting. Di gnûf, tu cjatarâs cuintâi di lezions e materiâi di riferiment in rêt e intes negozis di libris. Une ce tant biele introduzion, che in pratiche e je fate su misure par Haiku, e je chê disponibile in rêt: <a href="http://www.birdhouse.org/beos/bible/bos/ch_scripting1.html" class="printurl">Scripting Chapter</a> (<a href="http://www.birdhouse.org/beos/bible/bos/BeOS.scripting.PDF">PDF, 900 KiB</a>) de BeOS Bible di Scot Hacker.</p>
<h2>
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a><a id="user-scripts" name="user-scripts">Script in Haiku</a></h2>
<p>Haiku, timp indaûr, al veve dai script par inviâsi e par distudâsi. Vuê, al lôr puest, al dopre il <a href="https://dev.haiku-os.org/wiki/LaunchDaemon">launch_daemon</a>. Dut câs, l'utent al pues ancjemò miorâ chest procès cun determinâts script-utent.
Se no esistin za, tu varâs di creâ di bessôl i file che a coventin. In câs contrari, al baste zontâ i tiei comants dulà che tu ju desideris eseguîts dilunc il procès .</p>
<h3>
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="userbootscript" name="userbootscript">Il UserBootscript</a></h3>
<p><span class="path">/boot/home/config/settings/boot/UserBootscript</span> al vignarà eseguît dopo che il sisteme al varà finît i siei procès di inviament. Par esempli, tu puedis inviâ un ciert numar di programs che a vignaran fats partî in automatic a ogni inviament di sisteme:</p>
<pre># Start LaunchBox
/boot/system/apps/LaunchBox &amp;
# Start Workspaces Applet
/boot/system/apps/Workspaces &amp;</pre>
<p>Visiti di finî un comant cuntun "<tt>&amp;</tt>" par inviâlu come procès in sotfont, o il script si fermarà fintremai che il comant nol varà finît di lavorâ (in chest câs: la aplicazion inviade e je stade sierade).</p>
<p>Une semplice alternative par inviâ aplicazions al inviament, rispiet a ce che o ven mostrât chi parsore, e je chê di meti i lôr colegaments inte cartele <span class="path">/boot/home/config/settings/boot/launch</span>. Chest al pues jessi fat semplicementri fasint clic diestri su la aplicazion che tu desideris vê inviade in automatic, e lâ su <span class="menu">Cree colegament</span> e daspò <a href="tracker.html#navigating">navigâ</a> fin te cartele che o ven nomenât chi parsore.</p>
<h3><a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="usershutdownscript" name="usershutdownscript">Il UserShutdownScript - <i>ancjemò nol funzione</i></a></h3>
<p><span class="path">/boot/home/config/settings/boot/UserShutdownScript</span> al vignarà eseguît come prin pas intal procès di distudament. Se il script al torne un stât di jessude diviers di zero, il distudament al vignarà interot.</p>
<h3>
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
<a id="usershutdownfinishscript" name="usershutdownfinishscript">Il UserShutdownFinishScript - <i>ancjemò nol funzione</i></a></h3>
<p><span class="path">/boot/home/config/settings/boot/UserShutdownFinishScript</span> al è eseguît come ultin pas tal procès di distudament. Fâs câs che la plui part dal sisteme al è stât terminât cuant che chest script al ven eseguît.</p>
</div>
</div>
<div class="nav">
<div class="inner"><span>
«  <a href="preferences.html">Preferences</a> 
::  <a href="contents.html" class="uplink">Contents</a> 
<!-- ::  <a href="filesystem-layout.html">Disposizion dal filesystem</a>  » -->
</span></div>
</div>
</body>
</html>