bashの履歴

設定ファイル

/etc/profile は全ユーザ共通で最初に読み込む。
~/.bash_profile ~/.bash_login ~/.profile の順に読み込む。

ウィンドウタイトルを変更

case $TERM in
   kterm|xterm|mlterm|cygwin|vt102)
     _termtitle="\u@mindia_sakura1:\w"
     PS1="\[\e]0;${_termtitle}\007\]${PS1}"
     ;;
esac

シェルスクリプト


$0
自分自身のフルパス
$1, $2, ...
引数

if文

file="/path/to/file"
if [ -f $file ]
then
echo "$file exists"
fi