질문&답변
클라우드/리눅스에 관한 질문과 답변을 주고 받는 곳입니다.
리눅스 분류

profile 적용시 에러 도와 주셔요.

작성자 정보

  • 신현석 작성
  • 작성일

컨텐츠 정보

본문

/etc/profile 을 설정하다가 잘못해서 패스를 날리는 바람에 다른 것을 카피해서 저장한 후 suorce /etc/profile 하면 다음과 같은 에러가 나옵니다.

도대체 왜 그런건지 알수가 없네요..

고수님 들의 도움을 요청합니다.

[root@localhost root]# . /etc/profile
: command not found
: command not found
'ash: /etc/profile: line 6: syntax error near unexpected token `{
'ash: /etc/profile: line 6: `pathmunge () {
[root@localhost root]#

profile의 내용은 아래와 같습니다.

 /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi

done

unset i

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,043 명
  • 현재 강좌수 :  35,853 개
  • 현재 접속자 :  72 명