桜、抹茶、白、日記

名古屋市在住のC++使いのcoderの日記だったもの。

bash@Cygwin

久しぶりにCygwinbashで起動してみたら酷いことに・・・。

: command not found
: command not found
: command not found
: command not found
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
: command not found
bash: /etc/profile: line 63: syntax error near unexpected token `done'
'ash: /etc/profile: line 63: `  done <<- EOF
bash-3.1$

アップデートをかけた以外何も設定をいじっていないんだけど。
調べてみた感じでは定義ファイルの改行コードが原因の模様。下記コマンドの実行で修復完了。

$ d2u /etc/profile

再現させるには、

$ u2d /etc/profile

d2u/u2d コマンドは、Linuxの dos2unix/unix2dos コマンドとほぼ同じだな。Cygwinには両方入っているけど。