linux:bash

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:bash [2015/08/17 23:29] – [.bashrc をログイン時に自動で読み込ませる] ともやんlinux:bash [2023/03/12 14:52] (現在) – [参考文献] ともやん
行 1: 行 1:
 ====== Bash(Bourne-Again Shell) ====== ====== Bash(Bourne-Again Shell) ======
  
 +===== シェバン(shebang) =====
 +bash を絶対パスを指定
 +<code bash>
 +#!/bin/bash
 +</code>
 +env を使ってを指定
 +<code bash>
 +#!/usr/bin/env bash
 +</code>
 ===== source されたスクリプトのディレクトリパスの取得 ===== ===== source されたスクリプトのディレクトリパスの取得 =====
 <code bash> <code bash>
行 26: 行 35:
 ===== 端末起動時のプロンプト表示が遅い ===== ===== 端末起動時のプロンプト表示が遅い =====
 pk-command-not-found で時間がかかって bash の起動に時間がかかる。\\ pk-command-not-found で時間がかかって bash の起動に時間がかかる。\\
-.bashrc に以下の記述を追する。+.bashrc に unset command_not_found_handle を追する。
 <code> <code>
 $ vi ~/.bashrc $ vi ~/.bashrc
行 53: 行 62:
  
 ===== 参考文献 ===== ===== 参考文献 =====
 +[[https://www.tohoho-web.com/ex/shell.html|]]\\
 +[[https://atmarkit.itmedia.co.jp/ait/spv/1811/21/news009.html|]]\\
 +[[https://ja.wikipedia.org/wiki/%E3%82%B7%E3%83%90%E3%83%B3_(Unix)|シバン(Unix)]]\\
 [[http://qiita.com/yudoufu/items/48cb6fb71e5b498b2532 | bash/zshでsourceされたスクリプト内で、ファイル自身の絶対パスをとるシンプルな記法]]\\ [[http://qiita.com/yudoufu/items/48cb6fb71e5b498b2532 | bash/zshでsourceされたスクリプト内で、ファイル自身の絶対パスをとるシンプルな記法]]\\
 +[[http://luna2-linux.blogspot.jp/2011/03/fedora-14.html | Fedora 14 でコマンドを打ち間違えると・・・]]\\
 +[[https://blog.3qe.us/entry/2017/08/06/025159|bashの`export`の役割と`exec $SHELL -l`について補習する - Lambdaカクテル]]\\
 +[[https://shellscript.sunone.me/if_and_test.html|if 文と test コマンド | UNIX & Linux コマンド・シェルスクリプト リファレンス]]\\
 +[[https://shellscript.sunone.me/parameter.html|引数を処理する | UNIX & Linux コマンド・シェルスクリプト リファレンス]]\\
 +
  • linux/bash.1439821781.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)