![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Run Linux Command from Perl Scriptby ant (Scribe) |
on Mar 23, 2007 at 13:58 UTC ( #606239=perlquestion: print w/replies, xml ) | Need Help?? |
ant has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have a perl script running on Linux environment. I have a list of Oracle form files. These files need to be translated into text files, which I can open and look for various patterns etc. I loop though the perl script and create a shell script which looks like this /oracle/IAS/bin/frmcmp_batch.sh module=/home/forms/src/ealib450.pll module_type=library userid=XXXX/XXXX@XXXX compile_all=yes batch=yes script=yes Output_File=ealib450.txt debug=yes I then try to execute this command via, system command as I want the script to continue running afterwards (so exec is out). Code for running the command is system("sh $temp_shell2")|| print "2 failed to execute $!\n"; I read this here http://www.perlmonks.org/?node_id=78523, but still no luck! This fails with a 'Inappropriate ioctl for device' message, which I read could be a red herring! However if I open the Linux window, go to the directory and type the filename in, the script executes! Just to make matters more confusing, I can create a shell script in my windows environment with exactly the same command, putty the file over to the Linux box and Plink the file, and the file executes! Why can I not execute the Linux script Via the Perlscipt that created it in the Linux environment? Thanks in Advance Ant
Back to
Seekers of Perl Wisdom
|
|