blfs book -suggested /etc/profile

Bill's LFS Login lfsbill at wlmcs.com
Tue Jul 15 05:48:19 PDT 2003


On Tue, 15 Jul 2003, Linux wrote:

> Hi
>
> I have <snip lines that ungraciously extend far beyond column 72>

> The bits of code that appear to generate the error in my etc/profile
>
> # 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
> }
> # Add to the standard path
> if [ $(id -u) = 0 ] ; then
>     if [ -d "/usr/local/sbin" ] ; then
>         pathman /usr/local/sbin last
>     fi
> if [ $(id -u) != 0 ] ; then
>     if [ -d "/usr/local/bin" ] ; then
>         pathman /usr/local/bin last
>     fi
> fi
> if [ -d "/usr/X11R6/bin" ] ; then
>     pathman /usr/X11R6/bin last
> fi
>
> # Setup the INPUTRC enviroment variable
> if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc ; then

Need a ] ahead of that semi-colon there. BTW, if fairly new to shell
scripting, I suggest some reading of the LDP docs regarding bash scripts
and also use 'man bash' for quick(?) lookups.

><snip>

> Thanks Jeff Surgeson

HTH

-- 
Bill Maltby
lfsbill at wlmcs.com
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list