blfs book -suggested /etc/profile
linux at herbasource.com
Tue Jul 15 05:33:08 PDT 2003
I have used the suggested /etc/profile in the ver4.1 blfs book however it does not appear to like something and the $PATH is not set accordingly.
When logging in it shows [: missing ']' after the other login stuff, which would indicate to me that bash thinks there is a missing ] in the code somewhere.
I have checked and re checked and am 99.9999% sure that the code is identical to that in the book. I am very new to Linux so do not have the knowledge at this stage to see if the syntax of the code is correct but would imagine that it is correct otherwise it would not be in the 'book'
The bits of code that appear to generate the error in my etc/profile
# Function to help us manage paths
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:) ; then
if [ "$2" = "last" ] ; then
# Add to the standard path
if [ $(id -u) = 0 ] ; then
if [ -d "/usr/local/sbin" ] ; then
pathman /usr/local/sbin last
if [ $(id -u) != 0 ] ; then
if [ -d "/usr/local/bin" ] ; then
pathman /usr/local/bin last
if [ -d "/usr/X11R6/bin" ] ; then
pathman /usr/X11R6/bin last
# Setup the INPUTRC enviroment variable
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc ; then
I am sure that this is how it appears in the book, what is wrong?
Thanks Jeff Surgeson
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the blfs-support