Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Why does this only work when I am running a shellscript

Reply
Thread Tools

Re: Why does this only work when I am running a shellscript

 
 
RVic
Guest
Posts: n/a
 
      03-30-2013
Roedy, Isn't there a way for Java to "execute" a raw script? I recall doing this once but cannot find my old code.RVic
 
Reply With Quote
 
 
 
 
Joerg Meier
Guest
Posts: n/a
 
      03-31-2013
On Sat, 30 Mar 2013 08:41:17 -0700 (PDT), RVic wrote:

> Roedy, Isn't there a way for Java to "execute" a raw script? I recall doing this once but cannot find my old code.RVic


You have replied to the wrong post - your own, instead of Roedys. That
makes your thread hard to read for those trying to help you.

You can execute a raw script by executing (ba)sh (or cmd.exe under Windows)
and using the script as a parameter.

That being said: if your script is properly formatted (meaning the first
line looks like #!/bin/bash or whatever), it should be no problem executing
it the way you do now.

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      04-01-2013
On Sat, 30 Mar 2013 08:41:17 -0700 (PDT), RVic <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>Roedy, Isn't there a way for Java to "execute" a raw script? I recall doing this once but cannot find my old code.RVic


sure. Exec a command processor with the script as a parm. See
http://mindprod.com/jgloss/exec.html for examples.
--
Roedy Green Canadian Mind Products http://mindprod.com
Motors make noise, and that tells you about the feelings and attitudes
that went into it. Something was more important than sensory pleasure --
nobody would invent a chair or dish that smelled bad or that made horrible
noises -- why were motors invented noisy? How could they possibly be
considered complete or successful inventions with this glaring defect?
Unless, of course, the aggressive, hostile, assaultive sound actually served
to express some impulse of the owner.
~ Philip Slater (born: 1927 age: 85)
The Wayward Gate: Science and the Supernatural
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Why does this only work when I am running a shellscript Steven Simpson Java 0 03-30-2013 04:13 PM
Re: Why does this only work when I am running a shellscript Barb Knox Java 1 03-30-2013 04:07 PM
Re: Why does this only work when I am running a shellscript Roedy Green Java 0 03-30-2013 03:35 PM
Re: Why does this only work when I am running a shellscript markspace Java 1 03-30-2013 03:34 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM



Advertisments