トップ «前の日記(2008-09-14(Sun)) 最新 次の日記(2008-09-16(Tue))» 編集

屑俺日記

僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。


2008-09-15(Mon) 曇りらしい、いや、降ってる

bashもう少し

$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:$AND_SO_ON
 
$ unset PATH
 
$ /bin/bash --noprofile
 
$ echo $PATH
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.

遅いのでこれだけ。

ろくに眠れず、明け方近くに再開。
ソース(bash-3.2)のconfig-top.h に、

/* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE
#define DEFAULT_PATH_VALUE \
  "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
#endif

という行があった。で、DEFAULT_PATH_VALUE を適当に書き換えてビルドしてみる。

/bash-3.2$ unset PATH
 
/bash-3.2$ ./bash --noprofile
bash: hostname: command not found
bash: stty: command not found
bash: stty: command not found
bash: stty: command not found
 
/bash-3.2$ echo $PATH
/not_exists_path:.

リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。

index.htmlは ここから。