“/etc/profile未预期的文件结尾”问题
Tofloor
poster avatar
mainhometown
deepin
2018-01-16 09:24
Author
有大神解决一下吗?明明只有38行,却提示说39行有错误~
  1. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
  2. # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

  3. if [ "`id -u`" -eq 0 ]; then
  4.   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  5. else
  6.   PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin"

  7. #export CATALINA_HOME=$JAVA_HOME;/usr/local/apache-tomcat-7.0.14

  8. if [ "$PS1" ]; then
  9.   if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
  10.     # The file bash.bashrc already sets the default PS1.
  11.     # PS1='\h:\w\$ '
  12.     if [ -f /etc/bash.bashrc ]; then
  13.       . /etc/bash.bashrc
  14.     fi
  15.   else
  16.     if [ "`id -u`" -eq 0 ]; then
  17.       PS1='# '
  18.     else
  19.       PS1='$ '
  20.     fi
  21.   fi
  22. fi

  23. if [ -d /etc/profile.d ]; then
  24.   for i in /etc/profile.d/*.sh; do
  25.     if [ -r $i ]; then
  26.       . $i
  27.     fi
  28.   done
  29.   unset i
  30. fi
  31. tty | egrep -q tty[1-6] && export LC_ALL=C
  32. export NODE_HOME=/usr/local/bin/node
  33. export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
  34. export PATH=$NODE_HOME/bin:$PATH
Copy the Code


Reply Favorite View the author
All Replies
avatar
wtz
deepin
2018-01-16 10:41
#1
估计是粘贴的时候把控制字符也粘贴进去了。
把文件作为附件上传上来看看。
Reply View the author
avatar
SixGod
deepin
2018-01-16 19:31
#2
我记得在这种好像在最后打一个回车就好了?
Reply View the author
avatar
mainhometown
deepin
2018-01-17 00:04
#3
https://bbs.deepin.org/post/151886
估计是粘贴的时候把控制字符也粘贴进去了。
把文件作为附件上传上来看看。 ...

老哥看看
Reply View the author
avatar
mainhometown
deepin
2018-01-17 00:04
#4
https://bbs.deepin.org/post/151886
我记得在这种好像在最后打一个回车就好了?

试了回车不行哎老哥
Reply View the author
avatar
wtz
deepin
2018-01-17 03:03
#5

老哥,你第8行少个“fi”……
Reply View the author
avatar
b545798400
deepin
2018-01-17 07:00
#6
6楼说的对
Reply View the author
avatar
mainhometown
deepin
2018-01-17 08:18
#7
Reply View the author
avatar
mainhometown
deepin
2018-01-17 08:19
#8

666老哥
Reply View the author
avatar
mainhometown
deepin
2018-01-17 08:19
#9
https://bbs.deepin.org/post/151886
老哥,你第8行少个“fi”……

感谢老哥OK了已经
Reply View the author