Operating System - HP-UX
1748194 Members
4321 Online
108759 Solutions
New Discussion юеВ

Re: 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 2
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.