[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/profile



On Mon, 29 Nov 1999, Fish Smith wrote:

> My /etc/profile reads like this:
> # /etc/profile: system-wide .profile file for
> bash(1).
> 
> PATH=".:/usr/local/bin:/usr/bin:/usr/bin/X11:/usr/games:/usr/local/sbin:/usr/sbin:/sbin"
> PS1="\\$ "
> s9x() { snes9x /.roms/$1 }
> play() { mpg123 $*>/dev/null& }
> l() { dir $*|less }
> export PATH PS1
> umask 002
[...]
> Every time I login I get "bash: /etc/profile: line XX (varies as
> I tinker trying to get it to work, but always the last line):
> syntax error: unexpected end of file

The function definitions have to end with a semicolon, e.g.

  l() { dir $*|less; }

Otherwise, the } (and everything that follows) is considered a part
of the function definition, and therefore the file ends before the
definition ends. :)

Martin


-- 
Martin Dickopp                Email: dickopp@pktw06.phy.tu-dresden.de
Inst. f. Kern- und Teilchenphysik, TU Dresden, 01062 Dresden, Germany
Office ASB E22       Phone +49-351-463-3107      Fax +49-351-463-3114


Reply to: