LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linux: Pipe to stdout displays on the command line, but does not redirect to file

Hello all,

 

Several years ago, I was given the task of making a LabVIEW application run from the Linux command line with arguments.

 

Now I have the same task, and I naively thought, "Sure, no problem."  So, for my stdout output, I used something very similar to the following:

pipe.png

It seems to work fine in a compiled application, as it always has, and the prescribed string appears on the command line window.  However, the person testing the functionality here remarked that he couldn't successfully redirect output to a file.

 

For example:

 

If my compiled binary is "LabVIEW_executable", let's say it is called in the following manner:

 

/foo/bar> ./LabVIEW_executable >foo.txt

Since the desired output appears on the command line, you'd intuitively think that it would also appear in foo.txt, but it does not.  After tinkering for a while and coming up with very little in the way of search results, I thought I'd ask here.

 

Has anyone ever done this before?

 

I am very grateful for any assistance.

 

Regards,

 

Jim

0 Kudos
Message 1 of 3
(2,812 Views)

Your code snippet is piping to stdin which would likely show up on the console.  You want 1 to pipe your output to stdout.

0 Kudos
Message 2 of 3
(2,808 Views)

Ahhh, thanks a lot!

 

Whoops.  Looks like I made a novice mistake.

 

Nice icon, by the way.  Smiley Very Happy

 

 

0 Kudos
Message 3 of 3
(2,798 Views)