[oclug] set $PATH
Glenn Jackman
glennj at ncf.ca
Thu Jul 10 17:33:36 EDT 2003
On 2003-07-10 16:11, Patrick Smith wrote:
> Patrick Smith wrote:
> >export PATH=$PATH:$(ls -d /opt/OpenOffice.org*/program | tr \\12 : )
>
> Just one more note:
>
> This will give you a path ending with a colon. That's equivalent to
> having the current directory at the end of your path, which isn't always
> a good idea, for security reasons. A simple way to fix this is to
> repeat something from the beginning of your path at the end:
>
> export PATH=$PATH:$(ls -d /opt/OpenOffice.org*/program | tr \\12 : )/bin
Or, remove the trailing colon
export PATH=$PATH:`ls -d /opt/OpenOffice.org*/program | tr \\\n :`
PATH=${PATH%:}
--
Glenn Jackman
NCF Sysadmin
glennj at ncf.ca
More information about the OCLUG
mailing list