
Ubuntu日本語フォーラム

ログインしていません。
14.04LTSを使用しています。
PATHを通そうと思って’~/.profile’を変更していたのですがうまく行かず、もとに戻そうと思ったのですがデフォルトの状態や文法がわからず、困っています。
現在PCの動作に支障はないのですが起動するたびに「>予期しないトークン `if' 周辺に構文 エラーがあります -」と表示が出ます。
どこを直せばいいか教えていただきたいです。
↓~/.profileの現在の内容↓
"$HOME/.bashrc"
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
PATH="$HOME/bin:$PATH"
fi
# exists.
# for ssh logins, install and configure the libpam-umask package.
# if running bash
# see /usr/share/doc/bash/examples/startup-files for examples.
# set PATH so it includes user's private bin if it exists
# the default umask is set in /etc/profile; for setting the umask
# the files are located in the bash-doc package.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# ~/.profile: executed by the command interpreter for login shells.
#umask 022
fi
fi
if [ -d "$HOME/bin" ] ; then
if [ -n "$BASH_VERSION" ]; then
オフライン
中身がめちゃめちゃになっていますね。もとはこれだと思います。
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
PATH に値を追加するには
PATH="/xxx/yyy:$PATH"
を最後に追加するだけです。
オフライン