System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Where is the source command on HP-UX

 
James Sun
Occasional Advisor

Where is the source command on HP-UX

Hello,

source is a unix command. But, I cannot find it in HP-UX.

Where is it?

Thanks,
2 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: Where is the source command on HP-UX

Hi James:

It is a C-shell command:

http://docs.hp.com/en/B2355-60130/csh.1.html

In the POSIX shell ('/usr/bin/sh') you do:

# . /file_to_source

...that is: a dot; floowed by whitespace; followed by the name of the file to "source" or read into (include into) the parent script's environment.

Regards!

...JRF...
sen_ux
Valued Contributor

Re: Where is the source command on HP-UX

source works in c-shell.
Either you have to invoke a c-shell or if you are using a script change the shebang accordingly.