Ok so to real quick this I am not the most experienced perl programmer having only dug into it as needed. And well recently I needed it for something
So I have a script doing a series of system updates for a large user base. The only guarantee I have is solaris 10, unidata installed, and perl 5.10 or greater. Part of what I need to do is run some scripts against the unidata data. Withour JDBC installed for unidata it leaves me with a command line option only for getting a short data set and running a few other commands against it.
So in typical the command would look something like this
(cd $unidatadir;udt $command)
Running in a subshell is the cleanest way to do this IMO because of the cd to the directory requirement. The problem is in order to do it properly the environment variables DASP and DASU need to be set which are for an encrypted password and username respectively.
So right now my command also before the cd is setting the env variables for the subshell.
I guess what I am wondering if anyone has a perhaps cleaner way to do this as it seems slightly fragile to me for when it is distributed
In reply to Set env variables as part of a command by devilock76
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |