Update of user guide and welcome page and their translations.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38032 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,12 +9,14 @@
|
||||
*
|
||||
* Authors:
|
||||
* Humdinger <[email protected]>
|
||||
* Translators:
|
||||
* log-1
|
||||
*
|
||||
-->
|
||||
<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とスクリプト化</title>
|
||||
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -47,50 +49,49 @@
|
||||
|
||||
<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とスクリプト化</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>でそれらコマンドを1つ1つ手で打ち込んでいるようにコマンドが実行されます。<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>そもそもスクリプトはそれを解釈するシェルに大きく依存するため、まずはHaikuで使用されているBASHに精通する必要があります。BASHは広く使用されているシェルであるため、オンライン上に資料が豊富に存在します。すばらしいドキュメントの1つに、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にほぼピッタリの非常にすばらしい入門編に、オンラインで入手可能なScot Hacker氏によるBeOSの必読書の<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>)があります。</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>システムの起動時にアプリケーションを起動させるための、上記とは違うシンプルな方法の1つに、それらアプリケーションへのリンクを<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>はシャットダウン・プロセスの最初のステップで実行されます。このスクリプトが0でない終了ステータスを返すと、シャットダウンは中断されます。</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