Updated the translations of the user guide. Haiku-doc.css was moved into the userguide|welcome folder, the html-dtd folder was removed. Thanks to all contributers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35764 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../html-dtd/xhtml1-strict.dtd">
|
||||
<!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="en-US" xml:lang="en-US">
|
||||
<head>
|
||||
<!--
|
||||
@@ -9,13 +9,16 @@
|
||||
*
|
||||
* Authors:
|
||||
* Humdinger <[email protected]>
|
||||
* Translators:
|
||||
* mrNoisy
|
||||
* michael_s
|
||||
*
|
||||
-->
|
||||
<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>
|
||||
<link rel="stylesheet" type="text/css" href="../../Haiku-doc.css" />
|
||||
<title>Bash и скрипты</title>
|
||||
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -26,14 +29,14 @@
|
||||
<div class="nav">
|
||||
<div class="inner">
|
||||
<ul class="lang-menu">
|
||||
<li class="now"><img src="../../images/flags/ru.png" alt="" /> Русский</li>
|
||||
<li><a href="../fr/bash-scripting.html"><img src="../../images/flags/fr.png" alt="" />Français</a></li>
|
||||
<li><a href="../de/bash-scripting.html"><img src="../../images/flags/de.png" alt="" />Deutsch</a></li>
|
||||
<li><a href="../it/bash-scripting.html"><img src="../../images/flags/it.png" alt="" />Italiano</a></li>
|
||||
<li><a href="../es/bash-scripting.html"><img src="../../images/flags/es.png" alt="" />Español</a></li>
|
||||
<li><a href="../sv_SE/bash-scripting.html"><img src="../../images/flags/sv_SE.png" alt="" />Svensk</a></li>
|
||||
<li><a href="../jp/bash-scripting.html"><img src="../../images/flags/jp.png" alt="" />日本語</a></li>
|
||||
<li><a href="../en/bash-scripting.html"><img src="../../images/flags/gb.png" alt="" />English</a></li>
|
||||
<li class="now"><img src="../images/flags/ru.png" alt="" /> Русский</li>
|
||||
<li><a href="../fr/bash-scripting.html"><img src="../images/flags/fr.png" alt="" />Français</a></li>
|
||||
<li><a href="../de/bash-scripting.html"><img src="../images/flags/de.png" alt="" />Deutsch</a></li>
|
||||
<li><a href="../it/bash-scripting.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
|
||||
<li><a href="../es/bash-scripting.html"><img src="../images/flags/es.png" alt="" />Español</a></li>
|
||||
<li><a href="../sv_SE/bash-scripting.html"><img src="../images/flags/sv_SE.png" alt="" />Svensk</a></li>
|
||||
<li><a href="../jp/bash-scripting.html"><img src="../images/flags/jp.png" alt="" />日本語</a></li>
|
||||
<li><a href="../en/bash-scripting.html"><img src="../images/flags/gb.png" alt="" />English</a></li>
|
||||
</ul>
|
||||
<span>
|
||||
« <a href="preferences.html">Настройки</a>
|
||||
@@ -45,48 +48,47 @@
|
||||
<div id="content">
|
||||
<div>
|
||||
|
||||
<h1>Bash and Scripting</h1>
|
||||
<h1>Bash и скрипты</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>"Скриптинг" - это техника автоматизации процедур путем объединения команд и сохранения его в виде текстовых файлов, называемых "скриптами" ("сценариями"). Всякий раз, когда вы запускаете скрипт, команды обрабатываются одна за одной так, будто они были введены вами в <a href="applications/terminal.html">Терминале (Terminal)</a> вручную.<br />
|
||||
Скрипты могут варьировать от простейших, выполняющих всего несколько команд в особом порядке, до нетривиальных фрагментов кода, решающих сложные задачи.</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>Учитывая, что скрипты во многом зависят от оболочки, которой они интерпретируются, для начала вам следует ознакомиться с BASH, который используется в Haiku. В сети есть достаточно много ресурсов, ведь эта оболочка широко распространена. Хорошим руководством послужит работа Йохана Янссона (Johan Jansson) <a href="http://www.beforever.com/bashtut.htm" class="printurl">Introduction to bash - a tutorial for bash under BeOS</a>.</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">Библия скриптинга</a></h2>
|
||||
<p>После того, как вы изучили некоторые основы работы в командной строке, пришло время выпускать себя в мир скриптинга. Опять же, множество руководств вы найдете в сети и на полках книжных магазинов. Книга, созданная специально для Haiku, доступна онлайн: <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>) от создателя "BeOS Bible" - Скота Хакера (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">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">Скрипты в Haiku</a></h2>
|
||||
<p>Разумеется, в работе Haiku тоже используются скрипты. Загрузка и завершение работы - типичные скриптовые процедуры. Эти четко определенные последовательности могут быть расширены с помощью пользовательских скриптов.<br /> Если они еще не существуют, вам придется создать их самостоятельно. В ином случае, просто добавьте нужные команды туда, где они должны быть выполнены.</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> будет выполнен после того, как система завершит процесс загрузки. Например, вы можете добавить несколько программ, которые будут автоматически стартовать при каждой загрузке:</p>
|
||||
<pre># Запуск LaunchBox
|
||||
/boot/system/apps/LaunchBox &
|
||||
|
||||
# Start Workspaces Applet
|
||||
# Запуск Workspaces
|
||||
/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>Не забудьте добавить в конце команды знак "<tt>&</tt>", чтобы запустить этот процесс в фоновом режиме, иначе скрипт зависнет, пока эта команда не будет завершена, (в данном случае, когда запущенное приложение будет закрыто).</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>Более простая альтернатива для запускающихся приложений во время загрузки - разместить ссылки на необходимые программы в папке<span class="path">/boot/home/config/boot/launch</span>. Это может быть сделано правым кликом по приложению, которое вы хотели бы поместить в автозапуск, затем выбрав <span class="menu">Создать ссылку (Create Link)</span> и, затем, выполните перемещение по папкам используя <a href="tracker.html#navigating">навигацию</a>.</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> будет выполнен в качестве первого этапа в процессе завершения работы. Если скрипт возвращает ненулевой результат по окончанию, завершение работы прекращается.</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> выполняется в последнюю очередь в процессе завершения работы. Имейте ввиду, что большинство элементов системы уже не функционируют во время выполнения этого скрипта.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user