Interconectivity betewn scripts/shells and programming languages

The problem: I need the buttons from my interface (written in C, Java, perl or any other programming language) to run shell commands or scripts. Is there any posibility to do this? Or, can I make an interface in a shell (let's say bash) with buttons to run shell commands or scripts? And, if not, can I open a terminal to do all this (interface running shell commands)? Thank you very muck in advance!

Hello,
Of course you can! But it depends on the language you are going to use. For example, if you plan to use C, you can execute shell commands with the system function, included with stdlib (you can take a look just typing "man system" at your shell). I don�t know Java but I could ensure that it�s possible too. With Perl, you can do it, but now I don�t remember how (I did it long time ago). Take a look at a Perl manual. I think that the best approach is to select the programming language and then to find the correct way to execute the scripts. If you don�t have special needs, maybe Perl is a good choice because you can alter the code without compiling, so a debugging and an optimization of the program will be faster.
Good luck!
jmiturbe

Similar Messages

  • Poonya Script :: The new programming language for Web

    Poony Script is a new programming language for Web, working with proxies between Flash Player and ActionScript 3, and a powerful performance and high flexibility of development, in addition to being free and unrestricted.
    To learn more about the novel technology in between:
    http://www.poonya.com/

    Hello AHernandezIP,
    The "Poony Script" was not made up to leave the AS3, but to expand the capabilities of it in Flash.
    The performance needs been studied carefully, and we get more than 80% of the performance of AS3, and it is still better and better that agent works in the API.
    Yet even this year we will be launching version "Studio" to create files 'swf' directly from the browser.
    We now know that more and more programs are becoming more complex, and the famous "Internet Cloud" is coming increasingly to everyone.
    The need now is to make a compiler that runs directly from the browser without installing anything on your computer.
    Who has vision of the future known as the "Poony Script" will be helpful.
    Thank you!

  • Script and program name for MM:OUTWARD CHELLAN

    Hi all ,
    can any one give me the script name and program name  for MM:OUTWARD CHELLAN.
    Regards,
    Arun.j

    Hi
    There are Std Scripts for PO,RFQ,CONTRACT, GRN , GI Note etc in MM
    What is this Outward challan? what is its' equivalent SAP business document?
    Check in The Tcode NACE for the relavent one, for the Output applications like MR,MD,EF,ME etc
    Reward points for useful Answers
    Regards
    Anji

  • Script shell using LAME

    Hi,
    I'm new with this stuff but trying use script shell into automator for converting an aiff audio file into an mp3 file.
    Open automator choose service, then from utility choose run script shell and write this siple lines:
    for f in "$@"
    do
    /usr/local/bin/lame -b 256 -m j -h "$@" "${f/.*}".mp3
    done
    afplay '/Users/prod00/Library/Sounds/Converted.aif'
    The script works but not properly, in effect decode aiff to mp3 if the file is short (about 40sec.less) and then stop. But if I try to decode for example 3min. the script continue and never stop. Then I must stop the automator service from menubarand the file is decoded partially.
    Can sameone tell me where am I wrong?
    Thanks

    For everyone who is interest I've find myself a solution this is the code:
    for f in "$@"
    do
    /usr/local/bin/lame -b 128 -m j -h -S "$f" "${f/.*}".mp3;
    done
    This encode an audio file to mp3 128K bitrate, stereo, high quality
    Take care

  • Difference between a programming language and a scripting language??

    Can anyone tell me what is the difference between a programming language and a scripting language??
    Thanks,

    http://en.wikipedia.org/wiki/Programming_language
    http://en.wikipedia.org/wiki/Scripting_language

  • Error while executing unix shell script from java program

    Hi All,
    I am trying to execute unix shell script from a java program using Runtime.execute() method by passing script name and additional arguments.
    Code snippet :
    Java Class :
    try{
         String fileName ="test.ksh";
         String argValue ="satish"; // value passed to the script
         String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
         Process proc = Runtime.getRuntime().exec(exeParam);
         int exitValue = proc.waitFor();
         sop("Exit Value  is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    }Test.ksh
      export -- application realated paths..
      nohup  abc.exe 1> test.log 2>&1;
      $1
      exit.By running the above java class , i am getting exit Value: 139 and log file test.log of 0 bytes.
    when i am running the same command (/usr/bin/ksh test.ksh satish) manually, it's calling abc.exe file successfully
    and able generate the logs properly.
    Pls let us know where exactly i am stuck..
    Thanks in advance,
    Regards,
    Satish

    Hi Sabre,
    As per the guidelines provided by the article, i had done below changes..
    InputStream is = null;
    InputStreamReader iStreamReader = null;
    BufferedReader bReader = null;
    String line = null;
    try{
    String fileName ="test.ksh";
    String argValue ="satish"; // value passed to the script
    String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
    Process proc = Runtime.getRuntime().exec(exeParam);
    is = proc.getErrorStream();
    iStreamReader = new InputStreamReader(is);
    bReader = new BufferedReader(iStreamReader);
    System.out.println("<ERROR>");
    while((line = bReader.readLine()) != null)
    System.out.println("Error is : "+line);
    System.out.println("</ERROR>");
    int exitValue = proc.waitFor();
    sop("Exit Value is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    Now , it's showing something like..
    <ERROR>
    </ERROR>

  • Shell Script: Timeout and return error if Sqlplus hangs

    Shell Script: Timeout and return error if Sqlplus hangs
    Dear all,
    This morning, our production database hung with lots of ORA-600 and 7445. The issue has been escalated to Oracle Tech support but my monitoring script which tries to make a connection every 5 mins to the database to see if its up, did not alert me. The reason is that, it connected to the database and hung, never came out to report an error and so I never got alerted until a user called me.
    Can any one tell me how I can exit from the sqlplus block if I dont get a response in x seconds? This sqlplus block is being called with in a shell script.
    Any help is highly apprciated.

    I don't know of anything built into any shell scripting language that would do this, no. I'm not a Perl programmer, but I have a vague recollection that Perl may have something useful here.
    From the "separate thread" part of my comment, though, you could certainly spawn a separate thread (thread 2), have thread 2 wait a period of time, then look for a message from thread 1 and throw an error if the message hadn't been sent. I don't know that I'd be for writing multi-threaded shell scripts, though. The heartbeat also gives you a layer of redundancy so that something is monitoring the monitor in case that process stops working.
    Justin

  • Please provide me unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)

    please i am new in unix
    \please give me sample unix shell script (export and import of database schema)Instead of providing you the readymade unix shell script for your requirement, I will give you the hints to prepare the same at your own.
    Create a file with .sh extension.
    # Specify and set all required Environment variables.
    ORACLE_HOME, PATH, NLS_LANG, etc.,
    # Use the export command with all clauses
    export scott/tiger@orcl file=scott.dmp log=scott_emp.log
    # Compress it.
    compress scott.dmp
    Refer any unix/linux documents for scripting basics.
    http://www.bijoos.com/ora7/oracle_unix.htm
    Regards,
    Sabdar Syed.

  • Large applications - Labview and other programming languages

    Hello Labview Users,
    as the forum saw this very interesting thread about large applications programmed in Labview
    (see: http://sine.ni.com/niforum/niforum?requireLogin=False&forumDU=http://forums.ni.com/ni/board/message?... ) I would like to ask the community about their experiences with Labview applications in combination with other programming languages.
    In advance: I have several years of experience in programming Labview applications starting from quick-and-dirty solutions which had to run within few hours and complex test solutions. I saw Labview growing and becoming better with the released versions and lot of things I missed in former times got implemented in the meantime. Actually I have to develop a complexe ATE solution with numerous equipment to control and numerous data to be captured and archived. Despite the Verison 8 I still feel still some drawbacks of the LV concept which let me hestitate to setup the solution completly in Labview:
    1) It is alway hard to re-use code of complex applications since it is not possible to do some kind of global search an replace of functions
    variables etc. It nearly impossible to re-use approved code structures (e.g a state machine) if the "inner part" is changing more the a little bit.
    2) If the application requires a certain flexibility (e.g. exchangeable test equipment of varying vendors) this is hard to implement since you have to define a lot of parameters through your hierarchy if you dont want use global variables which slow down your application and hide
    the code functionality.
    3) Despite modern PCs the look and feel of LV applications appears somewhat slow compared to other applications. For complex user interfaces the polling methode generates a lot of complex code. (I dont have expierence with the event-structure).
    Now my questions:
    Do you have experience of implemention of complex solutions dividingthe code modules using Labview and other languages? Which other
    languages did you use? Why did you use these languages (speed, flexibility of text based code, available library functions)? Did you found out this to improve your development time and code maintainibility?
    (I concider a solution where I do the single tests with Labview-VIs but delegate all the test sequencing and data collection stuff written in PERL which allows really very compact code)
    I'm curious what your experiences are.
    rainercats

    Given that you're asking these questions in a forum for LabVIEW users the opinions given are going to be somewhat slanted towards the general like of LabVIEW. I've been working with LabVIEW for a long time, ever since 2.something on a Mac. I've written numerous large-scale applications as well as "mundane" instrument drivers. As you've noted you're experienced with LabVIEW, so you know some of its strengths and weaknesses.
    To address your specific questions:
    (1) Yes, that has always been a limitation in LabVIEW, but I don't believe it is an overriding one to choose C over LabVIEW. Putnam provided one workaround for the search and replace of VIs. Once you've programmed in LabVIEW long enough you get used to doing it this way. Is it clumsy? Yes. As for the re-use of code structures, that's not entirely true. You can create a "template" VI (a regular VI, not a .vit) that contains the code you want to re-use and place in your palette with the "Merge VI" option set. That way you can select it from your functions palette, plop it down on your diagram, and you get the "template" VI's diagram placed right into your new VI.
    (2) This is not something that is specific to LabVIEW, as this exists with any programming language. It's not the language that limits you here, it's how you've designed your code. In a language like C++ you would go with classes. You can do the same thing in LabVIEW. IVI is another option (though not preferred by me).
    (3) As Putnam mentioned, you should be using the event structure.
    Other thoughts:
    The biggest strength I see with LabVIEW is that each VI is a miniature program, which allows development and debugging of functions a snap. With a language like C you have to write another program to call that function in order to debug it. The biggest weakness? I would say user interface. Yes, even with the event structure. Don't get me wrong, the event structure has vastly improved the way user interfaces and event handling in general are done with LabVIEW, but it simply doesn't hold muster to a program written in C or VB. ActiveX anyone? LabVIEW still doesn't do ActiveX properly in terms of actually getting the controls to work. Programming ActiveX controls is just plain aggravating what with all the property nodes taking up so much diagram space.
    It certainly makes sense to use the best tools available to you to get the job done. In my recent projects I had to write software to run automated tests on some products my company made. The test modules were written in LabVIEW. The tests executive was a proprietary engine driven by a SQL Server database. I had to write a "wrapper" DLL that interfaced between the LabVIEW code and the executive since the executive hadn't been designed to call LabVIEW DLLs directly. This allowed us to use LabVIEW as the preferred language for developing the test modules and let the guys who were fiddling with the test executive do their bit. Of course, TestStand's premise is basically that.

  • What programming language should a beginner use for developing apps for mac and I phone etc

    Hi all
    I have just made the transition from pc to mac, years a go I dabbled in visual basic and was going to give it another go but having made the move to mac, now owning an iMac/ iPhone and iPad I am now thinking I would be better off learning a programming language that would enable me to create program's /apps for apple products. Can someone please point me in the right direction.

    If you want to develop apps natively, you'll have to go with Objective-C (language), Xcode (IDE), and the Cocoa Touch libraries. Objective-C is a super-set of C. So, if you've no background in C, start there. In fact, here are three books I recommend:
    Dave Mark, Learn C on the Mac:
    http://www.amazon.com/Learn-C-Mac-Dave-Mark/dp/1430218096
    Aaron Hillegass, Objective-C Programming: The Big Nerd Ranch Guide:
    http://www.bignerdranch.com/book/objective-c_programming_the_big_nerd_ranch_guid e
    Joe Conway & Aaron Hillegass, iOS Programming: The Big Nerd Ranch Guide (3rd Edition):
    http://www.bignerdranch.com/book/ios_programming_the_big_nerd_ranch_guide_rd_edi tion_
    Dave Mark's book covers C, and you probably don't need all of it. Once it gets to really elaborate storage issues (for which you'll end up using Core Data on iOS), you can skim. On the up side, you have some programming experience, which will make learning C easier. On the downside, it's in VB, which isn't as similar to C as most other languages are. But, it's a start.
    Hillegass covers some basic C in his book on Objective C as well. So you might can start with that. The final book only touches on Objective-C lightly and is really about using the iOS frameworks to do real work. It's entirely project based and will get to you building things and testing them and really creating iOS apps.

  • Oracle 11g and Supported Programming Languages for application development

    Hi,
    Currently we are running our Java application on Oracle 10g Lite. We are planning to upgrade to Oracle 11g Lite very soon. I have below queries to be answered.
    1. What are the programming languages supported for application development to work with Oracle 11g Lite mobile server and client ?
        - i have seen some note saying java and .net are supported. Wanted to know the complete list of supported programming languages on Oracle 10g Lite
    2. Oracle Forms 10g is supported on Oracle 11g Lite platform ?
        - i have some online application running on Oracle 10G Forms. Wanted to extend this to offline model using Oracle 10g Lite
    Thanks,
    Ashok Kumar.G

    Hi Ashok,
    1. What are the programming languages supported for application development to work with Oracle 11g Lite mobile server and client ?
                For the 11g version of the product, we changed the name to Oracle Database Mobile Server.    For clarity purposes, there is no product called Oracle 11g Lite mobile server.
                For a detailed list of what is/is not supported on the client, please consult the documentation.   See section 2.1 of the Mobile Client guide.  For programming languages you
                can use what you want, and we support the following technologies, JDBC, ODBC, ADO.NET.  What you code your application in is up to you.
    2. Oracle Forms 10g is supported on Oracle 11g Lite platform ?
                   On the database mobile server side of things we do not do testing with Oracle Forms 10g.    I do not know enough about applications developed with the Forms' product.   Database Mobile Server is a product that keeps tracks of changes that occur in a database, and then propagates those changes to an Oracle backend.   We offer 2 way synchronization between an Oracle backend database and a client.  If you are running the Forms application on the Oracle backend and want to propagate changes done out to the client, then this should work.    I say ** should **   because we have not tested it but I cannot think of a reason why it would not work.   It would be up to you to develop the client side application that would look at the data in the client database and display it to the user.    In the 11.x version of the product, we support 2 client databases, Berkeley DB and SQLite.
    thanks
    mike

  • How to invoke BASH shell and execute a command in that shell in Windows 98

    Hello, I have a problem and if somebody will help me, I will be very glad. Thank you.
    I am using BASH shell on Windows 98 OS by means of CYGWIN. And I want to invoke this BASH shell and execute a preprogrammed command in the shell (./scan fileName.txt) from a JAVA program. But so far, I am not sucessful. I can not read or write anything from / to BASH shell. It either blocks and freezes (When I use waitFor( ) ) or appears and disappears without executing scan command (When I do not use waitFor( ) ). My code is like this:
    // This method is used for compiling a file.
    // It invokes BASH shell and executes "./scan fileName.txt" command
    public void compileFileMethod () {
    try {
    Process proc = ( Runtime.getRuntime() ).exec ("C:\\MyDocuments\\CYGWIN.BAT); //I also tried to add -c ./scan fileName.txt after .BAT );
    // I also tried to write "C:\\MyDocuments\\BASH.EXE" but it did not help
    OutputStream ostr = proc.getOutputStream();
    BufferedWriter bw = new BufferedWriter ( new OutputStreamWriter (ostr) );
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader ( new InputStreamReader (istr) );
    InputStream errorStr = proc.getErrorStream();
    BufferedReader errorBr = new BufferedReader ( new InputStreamReader (errorStr) );
    bw.write("scan case40.10.txt"); /* I am trying to input the scan command to the shell,but it is not working*/
    bw.flush();
    Vector list = new Vector (1) ;
    String str;
    while ( (str = br.readLine() ) != null) {
    list.addElement(str);
    } // End of while
    Enumeration enumForList = list.elements();
    while ( enumForList.hasMoreElements() ) {
    String tempString;
    tempString = ( String ) enumForList.nextElement();
    System.out.println(tempString); // I am trying to read the outputs of the scan command but it is not reading (I can not see any output)
    I tried with and without waitFor( ), it did not work
    // wait for command to terminate
    proc.waitFor();
    // close streams
    br.close();
    bw.close();
    errorBr.close();
    } // End of try
    catch ( IOException ioe ) {
    JOptionPane.showMessageDialog (null, "Input / output error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of catch
    catch ( SecurityException se ) {
    JOptionPane.showMessageDialog (null, "Security error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    catch ( InterruptedException ie ) {
    JOptionPane.showMessageDialog (null, "Interruption error occured while compiling file ", "Error", JOptionPane.ERROR_MESSAGE);
    } // End of method compileFileMethod
    // Thank you for your helps and time.

    You cannot invoke BAT files directly, you have to invoke the program that run those files which is your Windows 98 shell. For example (under windows 2000), i would invoke "cmd.exe sricpt.bat some args", rather than "script.bar some args".
    Hope this will help you out.

  • Choose a programming language

    I want a program that can
    analyse http://www.youtube.com/browse?s=mr&t=&l=&e=en_US&p=*  (*=1-5) every 10 minutes
    then pick out  the link that start with http://www.youtube.com/watch?v=
    export their related information and their links to a form that I want
    sort them as their youtube added time
    and it can run on my webpage
    so what programming language should I choose to write this program?

    Your program consists of two parts, to query the site in a given interval and to display the videos/information on your website. I think PHP would suite best for displaying the videos on your page, but then, if you have a python/ruby powered website then use the one you make your website with. For the query part I would use python and write a small script that gets triggered via a cron job in the interval you like. Instead of parsing the contents of the page itself I would use the RSS feed provided by the youtube page, there's a python module named "feedparser" with which you can easily access the feed contents and extract the related information (shouldn't be more than maybe 50 lines of code), write it to a database (sqlite), in the form that you like, and retrieve the contents via your PHP script on your webpage. Or completely skip the time interval query part and just check for new videos when someone visits your website .
    Last edited by chimeric (2008-01-19 11:12:56)

  • How to create an Oracle DATABASE through Java Programming Language.. ?

    How to create an Oracle DATABASE through Java Programming Language.. ?

    Oracle database administrators tend to be control freaks, especially in financial institutions where security is paramount.
    In general, they will supply you with a database, but require you to supply all the DDL scripts to create tables, indexes, views etc.
    So a certain amount of manual installation will always be required.
    Typically you would supply the SQL scripts, and a detailled installation document too.
    regards,
    Owen

  • What programming language should i learn first?

    Hi, i'm Francis, from Rome. As you can see, i have a MacBook White with Mac OS X 10.5.8.
    Yesterday i downloaded *Xcode with iPhone SDK (version 3.1)*. I want to create Mac and iPhone/iPod/iPad applications.
    I read that there are several programming languages: Java, Cocoa, Cocoa Touch, C, C++, Objective C, Objective C++, Carbon, Classic, BSD, etc...
    What should i begin with? +I think Cocoa, Cocoa Touch, C and Objective C, but i'm not sure!+
    Can you help me? Thanks!

    Java, C, C++, Objective-C are languages. Cocoa, Cocoa Touch, Carbon, and Classic are what are known as APIs - resources you can use in your programs but not languages in their own right. BSD is short for BSD UNIX, and it's an operating system (that's the foundation for OS X). HTML is a document format more than a language.
    What language(s) to learn depends on your objectives or needs. OS X comes with Python, Ruby, PERL, AppleScript, and PHP languages (and JavaScript in the web browser). Current versions also include Java. If you install the OS X development tools, it adds C, C++, and Objective-C along with the XCode development environment.
    Each of the languages has it's strengths and weaknesses. From a purely educational standpoint, C is a high-level language that will teach you about low-level programming. Java teaches very strong object-oriented programming.
    Objective-C would permit you to develop using the iOS toolkits for iPhone and iPad, and also application programming for OS X.
    PERL, Python, and Ruby are all simple to learn scripting languages and very powerful for all sorts of automation tasks, text processing, and CGI scripting.

Maybe you are looking for

  • AC 5.3 - Critcal Permissions in Upload Files

    Hi Guys I am just looking for a bit of confirmation here.  I need to load some crital permissions via the upload files in the configuration tab. I believe that in the Function Action and Function Permission files I need to use ^! to represent that th

  • Leopard re installation on new hard drive issue.

    Hello, Recently my girlfriend and myself took a vacation so we had to bring the Macbook of hers...  Unfortunately the laptop fell out of the luggage and landed FLAT on the bottom.  Looking at the Macbook we got the dreaded gray question mark of death

  • How to access the result list in teststand after execution using labwindows​/cvi

    I am developing a user interface in labwindows/cvi that runs multiple teststand sequence files and would like to combine their reports (generated in teststand) into a single file at the end of a UUT. What is the best way to do this? At the moment, I'

  • Cannot connect to Nokia Music Manager! Help needed...

    I am using Windows Vista Home Premium with PC Suite version 6.83. Just got Nokia N95 and getting used to features however an issue concerning tranfering music from Laptop to phone. Originally simply sent tracks via blutooth however came across featur

  • ITUNES WON'T LET ME BURN A CD! HELP..

    I've burned CD's before, many of times, & it's worked.. but for some reason now, when I go to burn a CD, it doesn't work! The discs are blank, & it'll burn the first song of my playlist, but after that, it stops & sits there doing nothing for about 5