Getting error while calling a script within a script

Hi all,
I'm facing the following error while calling a script within a script,

/home/XXXX/.profile[21]: 0551-011: 0403-012 A test command parameter is not valid.
/home/XXXX/.profile[21]: test: 0403-004 Specify a parameter with this command.
stty: tcgetattr: A specified file does not support the ioctl system call.
stty: tcgetattr: A specified file does not support the ioctl system call.
----------------------------------------------------------------
The code will be looking like ,

The script a.sh contains,

#! /bin/sh
. /home/b.sh
exit

When i execute a.sh , i get the above error.

Kindly help me in this.

Thanks in advance.

-- Sri

can you post the script b.sh?

if you just want to call the script, no need of "."

. /home/b.sh

can be changed to

/home/b.sh

The script b.sh -> sets the env variables.

b.sh

#! /bin/sh

export LIBPATH=$ORACLE_HOME/lib:$MMHOME/oracle/lib/bin
export LINK\_CNTRL=L\_PTHREADS_D7

exit


---------- Post updated at 02:33 PM ---------- Previous update was at 02:32 PM ----------

Yep ,
by removing "." it works, but the actual scripts are legacy scripts and they contain like
[. /home/b.sh ]

so need to find a way to run the script with that .

This works just fine for me, in my environment -- bash in Debian..

Does this part is showing error, or some other part which you have truncated ?!

My error is similar to the one listed in the

Please put code inside code tags.

Remove "exit" or replace it with "return".

Since a sourced script is run in the calling shell's process, exit will terminate the calling process.