problem in Unix Env. in Shell script

sdir;csp os_lib-0.5.24;bdir;cbpdob ---enable-useosstl  os_lib-0.5.24;mbp  os_lib-0.5.24;

If i run this command in unix shell directly it is running.

sdir;csp HA_util-0.0.7;bdir;cbpdob ---enable-useosstl  HA_util-0.0.7;mbp  HA_util-0.0.7;
 HA_util === Configuring source package [ HA_util ]
 HA_util === Using autobase directory [ autobase/autobase-0.1.383 ]
 HA_util === Configuring package [ HA_util ] version [ 0.0.7 ]
 HA_util === Installing configure.in ...
 HA_util === Installing aclocal.m4 ...

I i put the same command in a file and execute that file it is saying
'sdir' not found
'mbp' not found

sdir is directory which is set in .profile
mbp is a utility ....

Note:
This is working when i executed in command line (shell)
If i put in file it is not working.

Tried
1)i tried saving the file as .ksh and run ./file.ksh
2)simply run the file in shell

try with add your script

 
source /homeyourdir/.profile
1 Like

Didn't get u

What ygemici was trying to explain was: If you have no issues when executing in interactive mode, but have when in batch, it is to do with your environment. one way to solve is to source your .profile e.g.
in your script add as first line:

. ~HOME/.profile

notice the space after the first dot ?

1 Like

Thanks a lot it worked