pipe

Pipe ffmpeg to oggenc(2) with .NET

I am trying to encode ogg files at -q 6/192k. ffmpeg doesnt seem to be listenting to my command ffmpeg -i blah -acodec vorbis -ab 192k -y out.ogg So i would like to use the recommended ogg encoder. It says the input must be wav or similar. I would like to pipe a wav from ffmpeg to ogg. However not only am i unsure if oggenc2 will acc...

How to combine "|" character in run () command in powerbuilder in order to read an txt file as metadata output of a file (pdf) ?

Could you please tell me how to use "pdftk mypdf.pdf dump data | findstr NumberOfPages in powerbuilder run command and save this metadata in a file by using the following code like this: string ls_runinput, ls_outputfile ls_outputfile = "c:\test.txt" ls_runinput = "c:\pdftk\pdftk.exe mypdf.pdf dump_data | findstr NumberOfPages >"+ls_ou...

Vim: Pipe selected text to shell cmd and receive output on vim info/command line

I want to pipe the selected text to a shell command and receive the one-line output from this shell command on the vim info/command line? What I'm really trying to do: Pipe the selected text to a pastebin-type shell command and I want to receive the output of the shell cmd (which is the http link to the pastebin). Is this possible? ...

Pipe dynamic PDF into Imagemagick and convert to PNG

I need to create thumbnails from dynamic (database driven) pdf's. I've used a variation of the script below in the past, but this doesn't seem to be working for me now (page just hangs). <?php require_once('./template/all_includes.php'); $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child will read...

C++: Failure to get data through pipe when using wide strings in both programs

Hi, I’m trying to use the following code in C++ on Mac OS X Snow Leopard to get the output of an external program through a pipe. FILE * al = popen("program program.cfg", "r"); string data; char buffer[100]; while (fgets(buffer, 100, al) != NULL) data.append(buffer); cout << "«" << data << "»" << endl; pclose(al); However, no data g...

Cheat sheet exhibiting bash shell stdout/stderr redirection behavior

Is there a good cheat sheet demonstrating the many uses of BASH shell redirection? I would love to give such a thing to my students. Some examples I'd like to see covered: cmd > output_file.txt #redirect stdout to output_file.txt cmd 2> output_file.txt #redirect stderr to output_file.txt cmd >& outpout_file.txt #redirec...

how to get result from wscript.execute() I need piping

Hi , I want to get result from an executing command by the help of wscript say : wscript.execute("dir c:\") I need to know how can I access to the results of this or in other words I want to know how can I pipe the result into my script? regards. ...

redirect output from file to three running thread

I want to use 'cat myclip.avi' command to send the output to three running thread, i am trying to process same clip file to produce three different result. can i use dup2 or how i can make pipe with thread not fork? Sorry about the question being so vague. Maybe I need to reinforce my understanding of dup2. actually i am using external ...

Multi Forks controlled by main parent pipe

I have this code, it work fin but if i change NUM_CHILDREN = 2 or any other number "not equal 1" it bad file descriptor. why is that? #include <stdio.h> #include <unistd.h> enum { NUM_CHILDREN = 1 }; static int pipes[NUM_CHILDREN][2]; void start_encoding(void) { pid_t d, h; int pipe_master[2]; pipe(pipe_master); ...

piping findstr's output

Windows command line, I want to search a file for all rows starting with: # NNN "<file>.inc" where NNN is a number and <file> any string. I want to use findstr, because I cannot require that the users of the script install ack. Here is the expression I came up with: >findstr /r /c:"^# [0-9][0-9]* \"[a-zA-Z0-9_]*.inc" all_pre.txt ...

Bash script, read values from stdin pipe

I'm trying to get bash to process data from stdin that gets piped it, but no luck, what I mean is none of the following work: echo "hello world" | test=($(< /dev/stdin)); echo test=$test test= echo "hello world" | read test; echo test=$test test= echo "hello world" | test=`cat`; echo test=$test test= where I want the output to be ...

IPC speed and compare

I am trying to implement a real-time application which involves IPC across different modules. The modules are doing some data intensive processing. I am using message queue as the backbone(Activemq) for IPC in the prototype, which is easy(considering I am a totally IPC newbie), but it's very very slow. Here is my situation: I have i...

How do I get the output from a Perl pipe as it becomes available?

The following code is working sort of fine: open( PIPE, '-|', 'ant' ); for( <PIPE> ) { print; } However, it doesn't do what I want. Since the Ant build can take 5 minutes, I would like to see the output line by line. Instead, I'm getting the entire input at the end of the process. Looking at it with the Perl debugger, Perl waits ...

Read from unix pipe when there's no one to write to it. (C++)

If I spawn a child and pass him a pipe, the child writes to the output of the pipe(to the parent) and after that the child dies. Can the parent read from the pipe what the child had written before it died? Thanks. (ps: I'm talking about C++) ...

python os.mkfifo() for Windows

Hello. Short version (if you can answer the short version it does the job for me, the rest is mainly for the benefit of other people with a similar task): In python in Windows, I want to create 2 file objects, attached to the same file (it doesn't have to be an actual file on the hard-drive), one for reading and one for writing, such t...

C Named pipe (fifo). Parent process gets stuck

I want to make a simple program, that fork, and the child writes into the named pipe and the parent reads and displays from the named pipe. The problem is that it enters the parent, does the first printf and then it gets weird, it doesn't do anything else, does not get to the second printf, it just ways for input in the console. #includ...

What does [a|b|c] evaluate to in SWI-Prolog?

The pipe operator in prolog returns one or more atomic Heads and a Tail list. ?- [a,b,c] = [a,b|[c]]. true. Nesting multiple pipes in a single match can be done similar to this: ?- [a,b,c] = [a|[b|[c]]]. true. What does the statement [a|b|c] infer about a, b and c? EDIT So far, all I can deduce is: ?- [a,b,c] = [a|b|c]. false....

C: Fifo between threads, writing and reading strings

Hello once more dear internet, I writing a small program that among other things, writes a log file of commands received. to do that, I want to use a thread that all it should do is just attempt to read from a pipe, while the main thread will write into that pipe whenever it should. Since i don't know the length of each string command, ...

Is there any tutorial on connecting .NET 4 Pipeline with Pipeline from some C\C++ programm?

Is there any tutorial on connecting .NET 4 Pipeline with Pipeline from some C\C++ programm? For example how to get data from VLC Pipeline output ... I mean VLC docs say that there command line args can eat name of pipe like YUV video output --yuv-file=<string> How to give such name to pipe created in your .Net programm so to be...

How to create PIPE accessible from remote computers in .NET 4.0?

How to create PIPE accessible from remote computers in .NET 4.0? And how to access it? ...