How to get the .profile executed for a user id when running a shell script on a unix server ? (139 Views)
Reply
Occasional Visitor
ssingla
Posts: 1
Registered: ‎11-28-2012
Message 1 of 2 (139 Views)

How to get the .profile executed for a user id when running a shell script on a unix server ?

While running a script on a Unix server using a ssh protocol, the tool is not executing the .profile of that user and hence not setting up proper environment for the script to be successful. Can u please suggest something so that the user's .profile is executed prior to running the script ?

 

Thanks

Trusted Contributor
ntt00015
Posts: 91
Registered: ‎09-18-2011
Message 2 of 2 (129 Views)

Re: How to get the .profile executed for a user id when running a shell script on a unix server ?

Hi,
If you use SSH shell operation you can set profile settings with first command after logon and then you can run your script. If you use SSH command operation, you can use the sessionId output parameter for the next command operation.


Best Regards.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.