bash won't source files from an login terminal unless I manually run bash from a terminal, I have bash (and not sh or dash). When I source a file, it returs errors (like "syntax error near unexpected " ) unless I don't run $ bash before source
$echo $TERM
screen-256color
$echo $SHELL
/bin/bash
$shopt login_shell
login_shell on
Error:
$source ./shrc
-bash: ./shrc: line 105: syntax error near unexpected token `('
$bash
$source ./shrc <-- now it works
Any ideas?
UPDATE 1
When I run bash, I enter in the non_login shell, and it works. Why login shell is unable to source file?
UPDATE 2
$echo $0
-bash
$bash
$echo $0
bash
UPDATE 3
else
echo;
echo "The SPEC environment variable is not set! Please source the shrc and try again."
echo;
fi
}
ogo() { <----- LINE 105
SHRC_NO_GO=0
TOP=$SPEC
if [ "x$TOP" != "x" ]; then
if [ "x$1" = "x--help" -o "x$1" = "x-h" ]; then
It's a file from SPEC2006 benchmarks (is a well-know program, it is not my code) My assumptions is that it's correct. (infact, on non-login shell, it works)