Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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

In reply to Run Linux Command from Perl Script by ant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found