问题描述
- profile中没有最后一行却说最后有错
-
/etc/profile: system-wide .profile file for the Bourne shell (sh(1))
and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='h:w$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi else if [ "id -u
" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi
fiThe default umask is now handled by pam_umask.
See pam_umask(8) and /etc/login.defs.
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
"/etc/profile" 23 lines, 637 characters written
root@zhaodan-virtual-machine:/# source /etc/profile
bash: /etc/profile: 行 24: 语法错误: 未预期的文件结尾
解决方案
显示所有文件内容,估计有不合法的不可见字符。
时间: 2024-09-04 01:09:14