Welcome to the Monastery | |
PerlMonks |
Source command in perl scriptby bannaN (Acolyte) |
on Oct 20, 2011 at 08:22 UTC ( [id://932586]=perlquestion: print w/replies, xml ) | Need Help?? |
bannaN has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I would like to create a perlscript that executes a DB2 ddl file for initializing a database. But the problem is that in order to do so (Script is runned by root) i have to do a source command. source /home/db2inst1/sqllib/db2profile How can i execute this inside a script, and make the script inherit this environment, so that commands later in the script issued with system will inherit this env? if if run This will result in the following error 'Can't exec "source": No such file or directory' even though i can execute the same command directly in the shell.
Back to
Seekers of Perl Wisdom
|
|