/etc/profile syntax error?

Tom Black tcblack at wireless111.net
Sat Apr 24 09:18:54 PDT 2004


LFS 5.0 system- just completed.
I cut and pasted the /etc/profile right out of the book, and now when I 
log in I get:
Last login: Fri Apr 23 23:24:19 2004
-bash: /etc/profile: line 14: syntax error near unexpected token `then'
-bash: /etc/profile: line 14: `.if ! echo $PATH | /bin/egrep -q 
"(^|:)$1($|:)" ;
  then'
-bash: .umask: command not found


FWIW here's the current section in the profile: (pasted from less)
# Function to help us manage paths
pathman () {
.if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
.if [ "$2" = "last" ] ; then
.PATH=$PATH:$1
.else
.PATH=$1:$PATH
.fi
.fi
}

The book shows.
# Function to help us manage paths
pathman () {
	if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
		if [ "$2" = "last" ] ; then
			PATH=$PATH:$1
		else
			PATH=$1:$PATH
		fi
	fi
}

Besides the indents, everything is identical.

-- 
Thomas Black
Linux Tutored by LFS 5.0
http://wr189.wireless111.com

Linux From Scratch:.˜./V\//†\\/(   )\^`˜´^
     .˜.
     /V\
    //†\\
   /(   )\
    ^`˜´^



More information about the blfs-support mailing list