I would like to handle multiple profiles(.profile/.kshrc, .profile1/.kshrc1..etc) with single user account as 'useradm' in same server.
for example :
firstly login into server with useradm account it has to load .profile/.kshrc or profile1/.kshrc1, set the environment variables and able to access application A or B.
mean to say load profiles dynamically with single user account to manage the applications by setting environment variables
When you login as useradm with ksh as your login shell, it will run .profile in useradm's login directory or the current working directory if one does not exist in useradm's login directory, and interactive shells will run .kshrc (or the file named by the ENV environment variable if it exists) if it exists.
Once that happens, why can't useradm run any desired application?
Why does a different set of initialization files need to be sourced to run a different application?
I'm planning to invoke multiple versions of application software using useradm account.
for example application software version is 1.0 & 2.0 , location of libraries, executables, jars are different as per versions and environment variables needs to be set accordingly .Please let me know how to set the environment dynamically ..
Thanks
If I get you correctly, you could define two aliases which in turn execute two scripts that create/set the relevant environment, locations, versions, etc...