Updated user guide plus translations. Thanks everyone. +alpha3

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41656 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Joachim Seemer
2011-05-22 18:01:43 +00:00
parent 0bbf2d42a3
commit fed577d81d
1143 changed files with 5581 additions and 4702 deletions
+23 -23
View File
@@ -16,7 +16,7 @@
<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 і скрипти</title>
<title>Bash і написання скриптів</title>
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
</head>
<body>
@@ -34,7 +34,7 @@
<li><a href="../it/bash-scripting.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
<li><a href="../ru/bash-scripting.html"><img src="../images/flags/ru.png" alt="" />Русский</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="../sv_SE/bash-scripting.html"><img src="../images/flags/sv_SE.png" alt="" />Svenska</a></li>
<li><a href="../jp/bash-scripting.html"><img src="../images/flags/jp.png" alt="" />日本語</a></li>
<li><a href="../zh_CN/bash-scripting.html"><img src="../images/flags/zh_CN.png" alt="" /> 中文 [中文]</a></li>
<li><a href="../pt_PT/bash-scripting.html"><img src="../images/flags/pt_PT.png" alt="" />Português</a></li>
@@ -49,50 +49,50 @@
<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 і скрипти</h1>
<h1>Bash і написання скриптів</h1>
<p>"Скриптинг"- це техніка автоматизаціі процедур <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's) .</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 &amp;
# Start Workspaces Applet
# Запуск Workspaces
/boot/system/apps/Workspaces &amp;</pre>
<p>Remember to end a command with an "<tt>&amp;</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>&amp;</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> directory. Це можна зробити правим кліком по додатку, котрий Ви бажаєте помістити в автозапуск вибором в меню <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>