LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 539|回复: 3

大家blfs5.1后,没遇到这样的问题吗?

[复制链接]
发表于 2004-7-10 20:33:26 | 显示全部楼层 |阅读模式
Last login: Sun Jul 11 04:31:40 2004
: command not found
: command not found
: command not found
'bash: /etc/profile: line 15: syntax error near unexpected token `{
'bash: /etc/profile: line 15: `pathremove () {
: command not found
: command not found
: command not found
'bash: /root/.bash_profile: line 12: syntax error near unexpected token `{
'bash: /root/.bash_profile: line 12: `append () {
 楼主| 发表于 2004-7-11 09:15:50 | 显示全部楼层
# Begin /etc/profile
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# modifications by Dagmar d'Surreal <rivyqntzne@pbzpnfg.arg>

# System wide environment variables and startup programs.

# System wide aliases and functions should go in /etc/bashrc. Personal
# environment variables and startup programs should go into
# ~/.bash_profile. Personal aliases and functions should go into
# ~/.bashrc.

# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH}
for DIR in ${!PATHVARIABLE} ; do
if [ "$DIR" != "$1" ] ; then
NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
fi
done
export $PATHVARIABLE="$NEWPATH"
}

pathprepend () {
pathremove $1 $2
local PATHVARIABLE=${2:-PATH}
export $PATHVARIABLE="$1${!PATHVARIABLE:+{!PATHVARIABLE}}"
}

pathappend () {
pathremove $1 $2
local PATHVARIABLE=${2:-PATH}
export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
}

if [ $EUID -eq 0 ] ; then
unset HISTFILE
fi

# Setup some environment variables.
export HISTSIZE=1000
export HISTIGNORE="&:[bf]g:exit"
#export PS1="[\u@\h \w]\\$ "
export PS1='\u@\h:\w\$ '

for script in /etc/profile.d/*.sh ; do
if [ -x $script ] ; then
. $script
fi
done

# Now to clean up after ourselves
unset pathremove pathprepend pathappend

# End /etc/profile
 楼主| 发表于 2004-7-11 09:16:37 | 显示全部楼层
# Begin ~/.bash_profile
# Written for Beyond Linux From Scratch
# by James Robertson <jameswrobertson@earthlink.net>
# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>

# Personal environment variables and startup programs.

# Personal aliases and functions should go in ~/.bashrc. System wide
# environment variables and startup programs are in /etc/profile.
# System wide aliases and functions are in /etc/bashrc.

append () {
# First remove the directory
local IFS=':'
local NEWPATH
for DIR in $PATH; do
if [ "$DIR" != "$1" ]; then
NEWPATH = ${NEWPATH:+$NEWPATH:}$DIR
fi
done

# Then append the directory
export PATH=$NEWPATH1
}

if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi

if [ -d "$HOME/bin" ] ; then
append $HOME/bin
fi

unset append

# End ~/.bash_profile
 楼主| 发表于 2004-7-11 11:29:24 | 显示全部楼层
搞定了,blfs的profile文件不知道怎么回事情,自动安装反而不行,自己一个个敲入profile文件,就没什么问题拉。呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表