Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
Fortuneのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
Fortune
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:視覚効果]] [[Category:コマンドシェル]] [[en:Fortune]] [[pt:Fortune]] {{Related articles start}} {{Related|アートワーク}} {{Related articles end}} [[Wikipedia:ja:Fortune (UNIX)|Fortune]] は引用句データベースからランダムに痛烈・示唆的・頓馬・皮肉なメッセージを表示するシンプルなプログラムです。''fortune'' コマンドラインユーティリティは、{{Pkg|fortune-mod}} パッケージの一部です。 == インストール == {{Pkg|fortune-mod}} または {{AUR|fortune-mod-git}} パッケージを[[インストール]]してください。 {{Tip| * 特定のソースからの引用を提供するメタパッケージは、[[AUR]] で "fortune-mod-" というプレフィックスで利用できます。例えば、{{AUR|fortune-mod-archlinux}} は Arch 関係の発言集を含んでいます。 * {{AUR|wikiquote-fortune}} を使うことで {{ic|wikiquote-fortune X}} で [http://en.wikiquote.org wikiquote] のページからフォーチュンファイルを生成することができます。X はページの名前に置き換えてください。フォーチュンファイルを使うには、{{ic|$ fortune /path/to/quote}} を実行します。この方法によって作られたフォーチュンファイルを [[AUR]] で見つけることができます。}} == 使用方法 == ターミナルで以下のコマンドを実行: {{hc|$ fortune| It is Texas law that when two trains meet each other at a railroad crossing, each shall come to a full stop, and neither shall proceed until the other has gone.}} インタラクティブシェルを起動したときにランダムな引用句を表示するには、シェルの rc 設定ファイルに ''fortune'' コマンドを追加してください: #!/bin/bash # ~/.bashrc fortune [[Dash]] を使用する場合: #!/bin/dash # ~/.dashrc fortune ターミナルにログインしたときにランダムな引用句を表示するには、シェルのプロファイル設定ファイルに ''fortune'' コマンドを追加してください: #!/bin/mksh # ~/.profile fortune {{Note|デフォルトでは、{{ic|fortune}} はあまり害のない引用句を表示します [https://github.com/shlomif/fortune-mod/blob/master/fortune-mod/Offensive]。しかしながら、過激と思えるような引用句もパッケージには含まれており、{{ic|/usr/share/fortune/off/}} に入ります。使用したい場合は {{man|6|fortune}} を参照してください。}} === Creating custom files === In order to create a custom file, you must first create a file containing the quotes. Between each quote you must add a line containing only the {{ic|%}} character. Save this file using whatever name you want, for example ''myquotes''. Then, run {{ic|strfile ''myquotes''}} in a terminal, in order to enable random access of the quotes. You can now access the quotes by executing {{ic|fortune ''myquotes''}} in a terminal. For this command to work you must be on the same directory as the {{ic|''myquotes''}} and {{ic|''myquotes''.dat}} files. If you want your quotes to be accessible by just running the {{ic|fortune}} command, you must move '''both''' files into the {{ic|/usr/share/fortune/}} directory. If you want to make any changes to your file, repeat from the start. === Cowsay === [[アスキーアート#Cowsay]] を参照。 ===Ponysay=== 256色の cowsay のようなアートとして {{Pkg|ponysay}} があります (バージョン 3.0 には422体のポニーが収録されています)。構文は同じで、何か喋らせるときは {{ic|$ ponysay ''message''}} を使い、ポニーのリストを表示するには {{ic|ponysay -l}} を実行します。表示するポニーを選択したいときは、{{ic|$ ponysay --pony x "message"}} を実行してください。x はポニーに置き換えてください。もっと多くのポニーを作りたい場合は、{{AUR|util-say-git}} を使ってデスクトップと TTY 用にそれぞれ {{ic|~/.local/share/ponysay/ponies}} と {{ic|~/.local/share/ponysay/ttyponies/}} に保存してください。 == 参照 == * [https://github.com/shlomif/fortune-mod fortune-mod GitHub プロジェクトページ]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Man
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
Fortune
に戻る。
検索
検索
Fortuneのソースを表示
話題を追加