Update the userguide from i18n.haiku-os.org
This commit is contained in:
@@ -9,12 +9,15 @@
|
||||
*
|
||||
* Authors:
|
||||
* Humdinger <[email protected]>
|
||||
* Translators:
|
||||
* Marek
|
||||
* helix84
|
||||
*
|
||||
-->
|
||||
<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 and Scripting</title>
|
||||
<title>Bash a Skriptovanie</title>
|
||||
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -41,67 +44,66 @@
|
||||
<li><a href="../en/bash-scripting.html"><img src="../images/flags/gb.png" alt="" />English</a></li>
|
||||
</ul>
|
||||
<span>
|
||||
« <a href="preferences.html">Preferences</a>
|
||||
« <a href="preferences.html">Nastavenia</a>
|
||||
:: <a href="contents.html" class="uplink">Contents</a>
|
||||
<!-- :: <a href="filesystem-layout.html">Filesystem layout</a> » -->
|
||||
<!-- :: <a href="filesystem-layout.html">Rozloženie súborového systému Haiku</a> » -->
|
||||
</span></div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div>
|
||||
<div class="box-info">The translation of this page isn't yet complete. Until it is, unfinished parts use the English original.</div>
|
||||
|
||||
<h1>Bash and Scripting</h1>
|
||||
<h1>Bash a Skriptovanie</h1>
|
||||
|
||||
<p>"Scripting" is the technique of automating procedures by stringing together commands and saving it all as text files, so called "scripts". Every time you run such a script, the commands are processed one after the other just like they would if you entered them into the <a href="applications/terminal.html">Terminal</a> by hand.<br />
|
||||
Scripts can range from simply executing a few commands in a specific order to sophisticated pieces of code that solve complex tasks.</p>
|
||||
<p>„Skriptovanie“ je technika automatizácie procedúr spájaním príkazov a ukladaním ich ako textové súbory, nazývané "skripty". Pri každom spustení takého to skriptu, príkazy sú vykonané jeden po druhom, tak ako by ste ich zadávali do <a href="applications/terminal.html">Terminálu</a> ručne.<br />
|
||||
Skript môže robiť všetko od vykonania niekoľkých príkazov v špecifickom poradí po sofistikované časti kódu na riešenie komplexných úloh.</p>
|
||||
|
||||
<h2>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
|
||||
<a id="bash" name="bash">The Bash</a></h2>
|
||||
<p>Since scripts rely naturally a lot on the shell they are interpreted by, you should first familiarize yourself with the BASH that's used by Haiku. There are many resources online as it's a widely used shell. One nice document is Johan Jansson's <a href="http://www.beforever.com/bashtut.htm" class="printurl">Introduction to bash - a tutorial for bash under BeOS</a>.</p>
|
||||
<a id="bash" name="bash">Bash</a></h2>
|
||||
<p>Keďže skripty prirodzene veľmi závisia na tom, ktorý shell ich interpretuje, mali by ste sa oboznámiť so shellom Bash, ktorý Haiku používa. Pretože je to široko používaný shell, existuje množstvo zdrojov online. Jeden pekný dokument je <a href="http://www.beforever.com/bashtut.htm" class="printurl">Introduction to bash - a tutorial for bash under BeOS</a> od Johana Janssona.</p>
|
||||
|
||||
<h2>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
|
||||
<a id="scripting-bible" name="scripting-bible">The Scripting Bible</a></h2>
|
||||
<p>After you've learned a few basics about working in the shell, it's time to slowly ease yourself into the world of scripting. Again, you'll find loads of tutorials and reference material online as well as in bookstores. A very nice introduction that's practically tailor-made for Haiku is the online available <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, 900kb</a>) of Scot Hacker's BeOS Bible.</p>
|
||||
<a id="scripting-bible" name="scripting-bible">Skriptovacia Biblia</a></h2>
|
||||
<p>Po tom čo ste sa naučili nejaké základy o práci v shelli, je čas opatrne zájsť do sveta skriptovania. Znova, nájdete množstvo návodov a referenčného materiálu online a tiež v kníhkupectvách. Veľmi pekný úvod, ktorý je prakticky šitý na mieru Haiku je k dispozícii online <a href="http://www.birdhouse.org/beos/bible/bos/ch_scripting1.html" class="printurl">Kapitola o skriptovaní</a> (<a href="http://www.birdhouse.org/beos/bible/bos/BeOS.scripting.PDF">PDF, 900kb</a>) v BeOS Bible od Scota Hackera.</p>
|
||||
|
||||
<h2>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a><a id="user-scripts" name="user-scripts">Scripts in Haiku</a></h2>
|
||||
<p>In Haiku, the system makes of course also use of scripting. Booting and shutting down are typical scripting procedures. These defined sequences can be augmented by the user with certain user scripts.<br />
|
||||
If they don't exist already, you'll have to create the needed files yourself. Otherwise simply add your commands where in the process you want them to be executed.</p>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a><a id="user-scripts" name="user-scripts">Skripty v Haiku</a></h2>
|
||||
<p>V Haiku, systém samozrejme tiež používa skriptovanie. Zavedenie systému a vypínanie sú typickými skriptovacími procedúrami. Tieto definované postupnosti môže používateľ doplniť o určité skriptami.<br />
|
||||
Ak ešte neexistujú, budete potrebné súbory musieť vytvoriť. Inak jednoducho pridáte svoje príkazy tam, kde chcete, aby boli vykonané.</p>
|
||||
|
||||
<h3>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
|
||||
<a id="userbootscript" name="userbootscript">The UserBootscript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserBootscript</span> will be executed after the system has finished its boot process. For example, you could launch a number of programs that would then be automatically started on every boot up:</p>
|
||||
<pre># Start LaunchBox
|
||||
<a id="userbootscript" name="userbootscript">UserBootscript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserBootscript</span> bude vykonaný potom čo systém ukončí proces zavedenia systému. Na príklad, môžete spustiť niekoľko príkazov, ktoré potom budú automaticky spustené pri každom zapnutí.</p>
|
||||
<pre># Zapnúť Spúšťač
|
||||
/boot/system/apps/LaunchBox &
|
||||
|
||||
# Start Workspaces Applet
|
||||
# Zapnúť Pracovné plochy
|
||||
/boot/system/apps/Workspaces &</pre>
|
||||
<p>Remember to end a command with an "<tt>&</tt>" to start it as a background process, or the script will halt until that command has finished (in this case: the launched app was closed again).</p>
|
||||
<p>Nezabudnite ukončiť príkaz znakom „<tt>&</tt>“, aby sa proces spustil na pozadí, alebo sa zastaví skript, pokiaľ sa nedokončí príkaz (v tomto prípade: spustená aplikácia bola znovu zatvorená).</p>
|
||||
|
||||
<p>A simple alternative to the above for launching applications at boot up is to put links to them in the <span class="path">/boot/home/config/boot/launch</span> directory. This can be done simply by right-clicking on the application you wish to have started automatically, going to <span class="menu">Create Link</span> and then <a href="tracker.html#navigating">navigating</a> to the above directory.</p>
|
||||
<p>Jednoduchá alternatíva k predchadzajúcemu spúšťaniu aplikácií pri zavádzaní systému je dať na ne odkazy do adresára <span class="path">/boot/home/config/boot/launch</span>. To môžme urobiť jednoducho kliknutím pravým tlačidlom myši na aplikáciu, ktorú si želáte spustiť automaticky, prejsť do <span class="menu">Vytvoriť odkaz</span> a <a href="tracker.html#navigating">navigovaním </a> do adresára uvedeného vyššie.</p>
|
||||
|
||||
<h3>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
|
||||
<a id="usershutdownscript" name="usershutdownscript">The UserShutdownScript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserShutdownScript</span> will be executed as the first step in the shutdown process. If the script returns a non-zero exit status, the shutdown is aborted.</p>
|
||||
<a id="usershutdownscript" name="usershutdownscript">UserShutdownScript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserShutdownScript</span> bude vykonaný ako prvý krok vypínacieho procesu. Ak skript vráti nenulovú hodnotu, vypínanie sa zruší. </p>
|
||||
|
||||
<h3>
|
||||
<a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
|
||||
<a id="usershutdownfinishscript" name="usershutdownfinishscript">The UserShutdownFinishScript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserShutdownFinishScript</span> is executed as the last step in the shutdown process. Note, that most parts of the system have terminated by the time this script is executed.</p>
|
||||
<a id="usershutdownfinishscript" name="usershutdownfinishscript">UserShutdownFinishScript</a></h3>
|
||||
<p><span class="path">/boot/home/config/boot/UserShutdownFinishScript</span> sa vykonáva ako posledný krok v procese vypínania. Pamätajte, že väčšina systému je v čase vykonania skriptu už vypnutá.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="nav">
|
||||
<div class="inner"><span>
|
||||
« <a href="preferences.html">Preferences</a>
|
||||
« <a href="preferences.html">Nastavenia</a>
|
||||
:: <a href="contents.html" class="uplink">Contents</a>
|
||||
<!-- :: <a href="filesystem-layout.html">Filesystem layout</a> » -->
|
||||
<!-- :: <a href="filesystem-layout.html">Rozloženie súborového systému Haiku</a> » -->
|
||||
</span></div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user