Hello,
I use this version of bash:
GNU bash, version 2.04.21(1)-release (i386-redhat-linux-gnu)
on RedHat Linux 7.1
I have this problem:
in /etc/profile.d is a file (login script -> mc.sh) which contains:
mc ()
{
mkdir -p ~/.mc/tmp 2> /dev/null
chmod 700 ~/.mc/tmp
MC=~/.mc/tmp/mc-$$
LC_COLLATE=c /usr/bin/mc -P "$@" > "$MC"
cd "`cat $MC`"
/bin/rm "$MC"
unset MC;
}
When I log in as non-root user after reboot or invoking
su - <user>
everything is OK.
When I log in invoking
su <user>
this error appears:
bash: /etc/profile.d/mc.sh: line 1: syntax error near unexpected token `()'
bash: /etc/profile.d/mc.sh: line 1: `mc () '
The same error appears when I run: bash --debug
I tried to correct this by changing
mc ()
{...}
to
mc()
{...}
or
mc() {
...}
Is it a bug or do I something wrong?
--
Best regards,
Dusan Juhas