Output to command line in Linux with built exe

Hi Folks,
Here's an interesting challenge...
I've got a VI that a customer wants to use as a command line utility in
Linux.  I've gotten command line arguments in without any
problem.  However, I can't seem to figure out how to get strings
back out to the prompt.  The first thing I tried was the system
exec VI that's in the communication palette.  Is there something
silly I've overlooked?
I've also seen some very limited discussion on how to output to the
command line using Windows API calls.  However, please remember
that I'm trying to output to the command line in Linux.
Thanks very much as always.
Jim

Hi Jim,
You can accomplish this using the pipe commands. Just don't open the
handle, stdout (0), stdin (1), and stderr (2) are always open. See the
attatched VI.
For the record, I haven't tried this as an executable, but it works
running in LabVIEW and I have no reason to expect that it wouldn't work
as an exe.
Jason
Attachments:
stdout.vi ‏17 KB

Similar Messages

  • Command Line Disk Share with Windows

    I am running Solaris 10 (SunOS 5.10) without the GUI interface. I cannot, therefore, run the Solaris Management Console.
    How do I share my disk with Windows systems on the same network using the command line?

    you can use samba for sharing its comes with solaris 10 , or use solaris 10 as nfs server and use PCNFS on windows end to mount the disk
    in solaris most of things dont require GUI , thats its beauty :)
    regards

  • Command line - two devices with the same name

    I have two identical logitech usb webcams on the same system,
    and I'm trying to use the command line to encode from each. The
    problem is that the xml profile requires the device name, but both
    devices are listed using the exact same name, so the command line
    only ever chooses one of the cameras as the source. Using the GUI,
    I can select one or the other because they both appear in the drop
    down list.
    Is there a way to specify the device index ala ActionScript,
    or another way to specify the device? I tried renaming the camera
    in the WinXP control panel, but that change was not seen by FME.
    Thanks!

    I'm having the same problem - I tried attaching my Canopus
    ADVC 1000 adapters to different Firewire chains (motherboard and
    PCI-based) but that didn't help.

  • Command Line Input Terminating with Ctrl+D

    Hi,
    I am writing a program, that gets the input from the command line, what I want the program to do it continue to get the input until Ctrl+D is entered but I can not work out how to do this.
    Has anyone got any ideas.
    Thanks,
    Adam

    Are you working in a unix system? If so, Control-D means end-of-input, so you don't specifically look for a control-D character, you just check for end of input (end of the stream). This is provided in IO routines, in particular BufferedReader:
    "Returns:
    A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached"
    So for example:
    import java.io.*;
    public class test {
      public static void main(String argv[]) {
        String line;
        int i = 0;
        try {
          BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
          while((line = in.readLine()) != null) {
            i++;
        } catch (IOException e) {
          e.printStackTrace();
        System.out.println("Now I'm done, having read " + i + " lines.");

  • Any command line audio player with song rating and play count?

    Is there any command line audio player that can handle song rating and play count? Thank you

    I answer my question: mpd + mpdcron can store song rating and play count and much more to sqlite database.
    Last edited by hariskar (2015-03-20 05:01:09)

  • Problem opening a file from a command line executed program with args

    I have to run my program from the command prompt like this:
    c:\ java Parser template.txt keyvalue.dat output.txt
    I figured out how to read the args in, and I know they are being assigned to the proper variables. My template.txt, etc are in the same directory that I am in when I run the program. They are also all lowercase, just like the command.
    The only error it throws is the one that I coded (Error opening file template.txt) I would make my message better if I knew what the problem was!!!!
    Any ideas (either for what I'm missing or how to improve my error handling) :\
    Jen

    After catching the exception, call the printStackTrace() to have it print out the error it caught, as well as the file and line number it occured on...

  • Command line e-mail with Chinese Characters

    We are writing a script that tells users that their password will expire
    in 2 weeks and how to change it in various places like network,
    GroupWise, PDA, conferencing system...
    Problem is that we have Many Chinese so we want the e-mail to be in both
    Chinese and English. We are using nail to format the e-mail but it is
    always coming through with boxes for the Chinese characters. Any idea
    one where the problem is occurring?
    Thanks,
    John

    John,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Disco command line import fails with parser error 7

    Hi, we have discoverer version 10.1.2.48.18 installed to multiple environments.
    Developers have created eex-file and we try to import it to all the test environments, it goes through fine with some but with some it fails with parser error 7 :
    Here is the full error log:
    11/13/2008 7:30:22 AM
    D:\disco1012\BIToolsHome_1\bin\DIS51ADM.EXE /connect /import oudata_disco.eex /identifier /refresh /preserve_workbook_owner /show_progress /log import.log
    oudata_disco.eex:Could not locate the Folder with identifier 'INSTRUCTOR_ASSIGNMENTS1' in the target End User Layer
    oudata_disco.eex:An imported Folder had display name 'Dc transactional sales q2' renamed to 'Dc transactional sales q2 1'
    oudata_disco.eex:An imported Item Class had display name 'Eval_Delivery_Region' renamed to 'Eval_Delivery_Region 1'
    oudata_disco.eex:An imported Item Class had display name 'Quarter' renamed to 'Quarter 1'
    oudata_disco.eex:An imported Item Class had display name 'Track List with ALL' renamed to 'Track List with ALL 1'
    The Item Hierarchy with identifier 'INSTRUCTOR_ASSIGNMENTS_LAST_REFRESH_DATE_DEFAULT_DATE_HIERARCHY' has not been imported because: There are no items in this hierarchy node
    Import completed, but with warnings. Please check the result.
    File(s) imported partially :
    oudata_disco.eex
    11/13/2008 7:36:38 AM
    11/13/2008 7:37:29 AM
    D:\disco1012\BIToolsHome_1\bin\DIS51ADM.EXE /connect /import oudata_disco_workbooks_84.eex /identifier /refresh /preserve_workbook_owner /show_progress /log import.log
    oudata_disco_workbooks_84.eex:A parsing failure has occurred in file 'oudata_disco_workbooks_84.eex'.
    Parser error: '7'
    The import has failed (your End User Layer has not been modified) - oudata_disco_workbooks_84.eex:A parsing failure has occurred in file 'oudata_disco_workbooks_84.eex'.
    Parser error: '7'
    If anyone knows what can be teh cause of this please let me know.
    thanks,
    Nina

    Hi,
    The most likely cause is that the export file has become corrupted. Are there very big export files?
    Another possibility is that Discoverer Administrator has run out of memory while parsing the file.
    Rod West

  • How to use oraxml command-line in LINUX

    Hi:
    I gave the classpath for xmlparserv2.jar and try to excute some of the commands like
    %oraxml -help
    I got oraxml: command not found
    How can I use it?
    Please help
    ALI_02

    You can't.
    They are two totally different operating systems.

  • Command line mp3 player with equalizer support?

    I would like to use CLI to play my mp3's, but MOC doesn't have a equalizer and that really hurts my ears. lol
    Is there another program I should look at or is there a way to add equalizer functionality?

    Roberth wrote:
    See if moc-svn is in AUR.
    EDIT:
    http://aur.archlinux.org/packages.php?d … s=0&SeB=nd
    Yes, but u have to --forcever if u want the 2057 branch that the patch was written for. Thanks to snowman for that tip.
    But, what I realized after reading the website http://moc.daper.net/node/310 is that developer branch 2061 has the patch for sound mixer already in it. So since makepkg forces newest svn version all u have to do is run makepkg or install with yaourt moc-svn and this functionality is all ready for use with the 'w' key.
    Thanks for the link shaika
    Last edited by jacko (2008-01-29 13:24:54)

  • How to run labview exe with command line

    I would like to launch a labview exe with a command line.
    I would like to get advice how to launch the Labview exe with giving values to the control parameters?
    You can view the example where x,y are the controls
    Solved!
    Go to Solution.
    Attachments:
    exe.png ‏65 KB

    There is a much more detailed guide here, which I reference below:
    1. First you will enable it in the settings:
    1. Open the properties for the application's build specification
    2. Navigate to the Advanced category
    3. Check the Pass all command line arguments to application box
    To pass the command line arguments to the application and access them in your code follow the same steps as for LabVIEW 7.x.
    2. Then you will use two hypens (--) to pass command line arguments to the VI. 
    When you launch LabVIEW or a stand-alone executable from the command line, you can pass user-defined arguments to the application. User-defined arguments start after two hyphens (– –) surrounded by spaces in the command line. For example, the following command line entry will launch LabVIEW 7.1 and open test.vi from the root of C:\ and pass 2 arguments, 1000 and sine:
    "C:\Program Files\National Instruments\LabVIEW 7.1\LabVIEW.exe" "C:\test.vi" –– 1000 sine
    You can also pass a command line argument directly to an EXE without launching LabVIEW, as long as the machine has the appropriate Run-Time Engine and necessary drivers.  For example, if test.vi was built into an executable, it could be called as follows:
    "<build directory>\test.exe" –– 1000 sine
    3. Lastly, you will use a property node to wire them to your controls:
    LabVIEW passes the arguments from the command line to the block diagram of the VI or EXE you launch. You can reference the arguments in the block diagram by using the Application:Command Line Arguments selection in a property node, as shown below.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • How to output instructions to the command line?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters? well you can execute the instruction directly not even going(piping through) to commandline.
    try{
    String command = "ls"; // for windows for example String command = "notepad";
    Process execCommand = Runtime.getRuntime().exec(command);
    // now if you want to pass parameters along with the  command use this
    String command2 ="ls /tmp" ; //respectively for windows
    // if there are many arguments which needs spaces then use
    String [] longCommand = new String[]{"find","whatever","path"}; // here find is the command and rest two are desired arguments.
    // now if you want to read the output from command line
    InputStream in = execCommand.getInputStream();
    int c;
    while ((c=in.read())!= -1)
    // process c the way you want
    } catch(IOException io)
    {}Edited by: KillerDev on Nov 2, 2008 12:00 AM

  • Bash shell does not recognise 'java', 'javac' commands (Linux command line)

    i' ve used javac and java compile & execute commands to build the same application on the DOS command line with Windows - no problem.
    But when I try to compile the same file on the command line under Linux Redhat (7.1) using Bash shell i get <bash: javac: command not found> and <bash: java: command not found>.
    In both cases I'm using j2sdk1.4.2 downloaded from java.sun.com for Windows & Linux respectively.
    I make sure I have both the javac and the file I want to compile in the same directory ../j2sdk1.4.2/bin for both the Windows and the Linux applications.
    Is there something I need to do to get bash to recognise javac, java etc? Is there a different setup procedure?
    Any angles on this are much appreciated ..

    Have you tried these correctly..
    Set the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>
    To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>
    Then do
    export PATH=$PATH:$JAVA_HOME/bin
    verify it has worked by simply typing
    java
    You can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    This shall resolve the issue .

  • Error while running a Discoverer Workbook with parameter from command line

    I am trying to run a discoverer report from command line and export the results in xls on to my local machine. I could do it fine for a simple workbook, but if I add a parameter(madatory) to the workbook and run it from command line specifying the parameter value I wanted to run the report for, I do not get any results. Here is the command line I am using.
    dis51usr.exe /connect user/password@database /apps_user /apps_responsibility "System Administrator" /eul EUL_US /open C:\Disco\Test.DIS /sheet Testsheet /parameter Period Jan-07 /export xls C:\Disco\X.xls /batch
    Parameter value is entered in correct format(Jan-07).
    When I removed /batch from this to see if I get any error, Discoverer Desktop opened up, logged in and gets terminated saying 'Oracle Discoverer Desktop has encountered a problem and need to close. We are sorry for the inconvenience.'
    Did anybody come across this issue before?

    Hello,
    If you have a few minutes, Windows is also aborting for me:
    the differences are, my situation is:
    a) am running the command line from a .bat file
    b) am NOT running with parms, want the discoverer query to come up for the user
    c) am running a query from the database
    i am signing in as myself BUT running a query that was created by a generic user called SREG
    c) if i run the .bat file from Windows Explorer, the query opens fine
    d) if i execute the .bat file from within Microsoft Access using the shell command,
    the query opens and then aborts RIGHT BEFORE the parm screen would display
    e) btw, if i modify the .bat file, to run a query from MY database signon, then (d) - running .bat file
    from vb using SHELL command works
    Do you have a ideas as to why (d) does not work? I would be very grateful for your time, tx, sandra
    this is what i posted yesterday, tx: Re: Running Discoverer command line
    tx, sandra

  • Using Command Line Tool for Linux

    I have to use the command lines of Linux for SCM commands(like repcmd, set workarea, checkin etc...)
    should I have to install something?
    I have documentation for using the oracle repository command line Toll for Windows and Unix, but I didn't found anything about using the oracle repository command line Toll for Linux.

    JDeveloper runs excellent on Linux and is supposed to be able to use the repository, but that's a GUI...

Maybe you are looking for