/etc/profile syntax error?

Alessandro Orsi elcan_guru at yahoo.es
Sat Apr 24 10:01:04 PDT 2004


El Sábado, 24 de Abril de 2004 18:18, Tom Black escribió:
> 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.

I've cut and paste from your mail (pasted from less) and got the same error, 
but no error if I cut and paste from "the book shows".
There should be no period before instructions but you seem to have one before 
any instruction in the piece of script you've posted.

Ale.



More information about the blfs-support mailing list