Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [pipe]

A Unix pipe connects file descriptors of two processes. A pipe is created with the POSIX pipe() function declared in . Shells provide pipe creation between processes using "|". Pipes can also be created on Windows with CreatePipe(). This concept is available for portably redirecting standard input, ...

-1
votes
0answers
9 views

Python Multiprocess calls a subprocess that reads from another subprocess, still blocking with demonize set to True [duplicate]

I have a video transmitting app written in python, and I have been struggling to make the "Transmit" button, non-blocking. After the tranmission starts, the transmit button is supposed to disable, ...
2
votes
1answer
36 views

C++ both input and output pipe to the external program

I am trying to invoke external program with some input and retrieve the output from it within a program. It will be look like; (some input) | (external program) | (retrieve output) I first ...
0
votes
0answers
12 views

using ffmpeg for silence detect with input pipe

I am trying to detect silence from audio file with ffmpeg in c#.i want to pipe input from c# memory stream and get silence duration like following command ffmpeg -hide_banner -i pipe:0 -af ...
0
votes
2answers
25 views

How to print username in content page, from Wordpress CMS?

How do I print the logged in username/display name on a content page from a Wordpress CMS editor. E.g. "Hi [Username]" would end up as "Hi John", if they are logged in?
0
votes
0answers
18 views

Establishing a simplex Annonymous Pipe between Windows App and DLL

I have a desktop application and a DLL. I want to call the DLL's functions and in the process of these functions, I want the DLL to send text messages back to the app in order to modify the Form's ...
0
votes
0answers
13 views

Passing an input via pipes to systemctl command

I'm exploring systemd and tried my hand at monitoring a service from a remote server. When I run systemctl --host root@Server_2_IP status test.service on my Server 1 then I get: root@Server_2_IP ...
0
votes
0answers
14 views

Shorthand for moment pipe for time ago using local?

I'm have the momentjs pipe with my angular package. Link: https://www.npmjs.com/package/angular2-moment With it I'm able to use the amTimeAgo pipe to get the time from ago: {{ myDate | amTimeAgo }} ...
0
votes
2answers
19 views

Import many files .txt in SAS

I built a code to import multiple data simultaneously into SAS, but I want to improve it does anyone have any suggestions? filename indata pipe 'dir E:\Desafio_SAS\Dados /B'; data file_list; ...
0
votes
0answers
22 views

In command prompt, is there a way to force a program to keep its standard input and output connected to the terminal?

I currently have a Ruby script doing this but I want to get rid of that and replace it with a batch script. I'm not sure if this is possible. Update: I did some testing and found that while app.exe ...
14
votes
4answers
34k views

How to read to and write from a pipe in Perl?

I'm a Perl noob, so please excuse this basic question. I need to modify an existing Perl program. I want to pipe a string (Which can contain multiple lines) through an external program and read the ...
0
votes
0answers
15 views

How to decrease the latency of the RTP streaming with ffmpeg in Android?

I'm creating a App that do a RTP streaming. It uses a ParcelFileDescriptor pipe pair, where a MediaRecorder writes in the pipe while the ffmpeg receives the audio from the pipe and sends by RTP. In ...
1
vote
0answers
44 views

Non blocking stdout[C / Linux]

I have to write program that performs operations based on data received by udp sockets and which must to write data to pipe whenever its possible(by possible i mean that there is enough space in pipe)....
0
votes
1answer
21 views

How do I solve ERROR TypeError: Cannot read property 'forEach' of undefined in Angular?

I'm trying to display movie categories and I get an Error: cannot read property of 'forEach' of undefined but my code runs as expected. I don't know why this errors pops up while I inspect in google ...
2
votes
1answer
33 views

Bad File Descriptor In Recursive Piping Function using Execvp, fork, and pipe

I'm attempting to create a recursive piping function using dup2(), fork(), and pipe(). However, when my array is something like {"ls", "grep shell"} (where shell is the name of my shell), it goes in ...
0
votes
0answers
15 views

how to translate placeholder text that is dynamically determined with a pipe using i18n tools

I am in the process of using i18n to add translation to my project but I have a problem with trying to apply this technique to an input box with a placeholder that is dynamically determined by a pipe: ...
1
vote
2answers
40 views

Rxjs Convert Observable<any>[] to Observable<any[]>

Let's imagine that we have two interfaces: export interface IA{ something: string; myprop: number; } export interface IB{ myprop: number; } I have a method that should call endpoint that ...
0
votes
1answer
11 views

Refused to display 'https://www.youtube.com/watch?v=oKZRsBjQJOs' in a frame because it set 'X-Frame-Options' to 'sameorigin'

I need to place a video from youtube in my website but the URL is a variable, I created a pipe to can put, but don't work. This is my code in HTML file <iframe width="670" height="348" [src]...
0
votes
1answer
27 views

How do I capture the exit codes from $PIPESTATUS and use it to exit the script?

I am using $PIPESTATUS to print the exit code for each pipe command. I now know that pipes run in parallel but once the exit code is <>0, how do I get the script to exit instead of progressing to ...
5
votes
2answers
216 views

Using read -p in a bash script that was executed from pipe

I apologize in advance - I don't fully understand the ideas behind what I'm asking well enough to understand why it's not working (I don't know what I need to learn). I searched stack exchange for ...
-1
votes
0answers
13 views

How to use truncate with ngx-translate

I am trying to truncate string after it gets translated. I need help on how to use truncate after the string gets translated. < span class="inputName" translate>{{ TIMESLOT_1 | truncate:[4] }} ...
0
votes
1answer
14 views

Preserve colors of heroku logs output when piping to other command (e.g. grep)

I am using grep to remove a lot of log noise generated e.g. by NewRelic. I do so using the following command: heroku logs --force-colors -t -a myApp -s app | grep --color=never web.1 Unfortunately ...
1
vote
1answer
48 views

Can I stop later parts of a pipeline from running if an earlier part failed?

I have a piped command such as: set -euxo pipefail echo 'hello' | foo | touch example.sh This is the output: $ set -euxo pipefail $ echo hello $ foo $ touch example.sh pipefail.sh: line 4: foo: ...
773
votes
10answers
312k views

How to pipe stderr, and not stdout?

I have a program that writes information to stdout and stderr, and I need to grep through what's coming to stderr, while disregarding stdout. I can of course do it in 2 steps: command > /dev/null ...
66
votes
5answers
61k views

Using Pipes within ngModel on INPUT Elements in Angular

I've an HTML INPUT field. <input [(ngModel)]="item.value" name="inputField" type="text" /> and I want to format its value and use an existing pipe: .... [(ngModel)]="item.value | ...
4
votes
1answer
45 views

Explain this bash redirection behaviour

I was experimenting with redirections and pipes and did not understand some behaviour. I have this snippet to generate one line on each of stderr and stdout: (echo stdout; echo stderr 1>&2) ...
2
votes
1answer
43 views

How to display No records found message using search pipe in angular

I am using the below search pipe to display the set of records and appending the pipe name in HTML file. The below pipe will get the user typed value in search bar and display the records based on ...
41
votes
6answers
22k views

How to avoid echo closing FIFO named pipes? - Funny behavior of Unix FIFOs

I want to output some data to a pipe and have the other process do something to the data line by line. Here is a toy example: mkfifo pipe cat pipe& cat >pipe Now I can enter whatever I want, ...
50
votes
5answers
29k views

Pipe character in Python

I see a "pipe" character (|) used in a function call: res = c1.create(go, come, swim, "", startTime, endTime, "OK", ax|bx) What is the meaning of the pipe in ax|bx?
0
votes
1answer
20 views

Exchange powershell, filtering part string for SamAccountname export

I am using Exchange 2010 and trying to run a PowerShell to export all users that have a User mailbox, I am using the PowerShell below Get-Mailbox -resultsize unlimited -recipienttypedetails ...
1
vote
2answers
34 views

Angular date pipe custom output

If you take a look in Angular's DatePipe documentation you'll see at the pre-defined format options there's a 'long' format that looks like this: June 15, 2015 at 9:03:01 AM GMT+1 I want to achieve ...
-1
votes
3answers
60 views

Piping into a command

There is a way to pipe into a command? For example: On one folder I have 2 files: filesnames file1 filesnames contains: file1 file1 contains: 11 22 33 44 11 And when I run the command (on the ...
0
votes
1answer
31 views

angular 6 template with async pipe

I have the following template code in a component: <div *ngIf="current_user | async as cu"> <a href="#" *ngIf="!(cu.id > 0)">Sign In [{{cu | json}}]</a> </div&...
-3
votes
1answer
46 views

pipe - fork - c - why the program is unresponsive without any error?

Hi i was writing a program to do cat inputs.txt | sort | uniq in c programming using pipe, fork and dup2 but the program seems to not run any thing at all. I placed a printf at the beginning, right ...
36
votes
8answers
35k views

What is a simple explanation for how pipes work in Bash?

I often use pipes in Bash, e.g.: dmesg | less Although I know what this outputs, it takes dmesg and lets me scroll through it with less, I do not understand what the | is doing. Is it simply the ...
-1
votes
3answers
39 views

Choose the top five values from each group in r

I'm working on hflights dataset in R trying to extract some useful insights. I managed to get the most visited destinations in weekends for each season. As I want to make a plot for my insight, I want ...
1
vote
1answer
15 views

Gnuplot from C program - Only allows for plotting for files over certain lengths

I think I have run into the weirdest bug I have ever encountered. I am using pipes in C for using gnuplot. I have a datafile named corr.dat which looks like this: 0 2.535107 2.535107 1 3.363503 3....
1
vote
0answers
61 views

Combining 3 programmes into one using fork pipe dup2 etc [closed]

I have following 3 programmes: A program that prints out all of its command-line arguments prog1.c #include <stdio.h> int main (int argc, char *argv[]) { int count; if (argc > 1) {...
-1
votes
1answer
115 views

Microshell implementation, pipe issues

I'm currently working on a implementation of a microshell that uses Linux system calls. Most of my code is there and working, but I ran into an issue when trying to pipe one command to another. When I ...
0
votes
0answers
17 views

Correct way to implement multiple pipes in Python

I am computing the overhead time for creating processes (multiprocessing module) and sending data with pipes. def worker_process_pipe(pipe, image): pipe.send(image) pipe.close() def ...
-1
votes
2answers
61 views

Inserting bash script in python code

I am trying to execute a bash script from python code. The bash script has some grep commands in a pipe inside a for loop. When I run the bash script itself it gives no errors but when I use it within ...
2
votes
1answer
37 views

how I convert a classNames to an icon element in angular use pipe

I want to convert class names to an icon. eg: the input class names are "anticon anticon-tags" I want to get the icon like this "<i class="anticon anticon-tags"></i>" the pipe I write ...
0
votes
0answers
51 views

Subsetting, and altering a vector in a pipe

Reproducible Example: > foo <- rep("A",8) %>% .[c(2,4,8)] <- "D" Error in rep("A", 8) %>% .[c(2, 4, 8)] <- "D" : target of assignment expands to non-language object > foo <-...
3
votes
2answers
59 views

How to stream one file to multiple pipelines efficiently

I have a script that wants to run several programs / pipelines over a very large file. Example: grep "ABC" file > file.filt md5sum file > file.md5 The kernel will try to cache the file in RAM, ...
1
vote
0answers
44 views

can't read all file lines in bash pipeline

I searched and couldn't find anything, maybe I can't understand the problem properly. I have a bash function who read files in current dir and sub dir's, I'm trying to arrange the text and analyze the ...
3
votes
2answers
44 views

How to combine awk and if in bash

I have 2 text file named as newport and panel port shown below. My awk command combines two files according to their common line to port.txt. I want also not common lines in the new file described in ...
1
vote
1answer
28 views

Angular / how to get the api return data

I use pipe and map to send to return value. add(content): Observable<Comment> { return this.apiService .post('/api/comment/', comment) .pipe(map(data => ...
0
votes
1answer
51 views

Product of two columsn, added to the next row, and so forth

I am attempting to produce the product each row in a multi-row file and add it the subsequent row and so fort. So I would essentially go with awk '{print $1 "/t" ($2 * $3)' filename > temp how ...
1
vote
2answers
17 views

How to pipe multiple binary files to an application which reads from stdin

For a single file, $ my_app < file01.binary For multiple files, $ cat file*.binary | my_app Each binary file is of size 500MB and the total size of all file*.binary is around 8GB. Based on my ...
0
votes
2answers
46 views

Trying to redirect stdout and stderr on Windows - _fileno(stdout) returning -2

This is my first question here! I'm about to port some piece of fine working C++ code from UNIX to Windows, which redirects stdout and stderr to a custom GUI Component through pipes. I need it to ...
1
vote
0answers
52 views

What's the KeyEvent for pipe? (|)

What's the KeyEvent for pipe? I mean this key - '|'. I'm using java.awt.Robot.keyPress and I can't find a way to send send '|'. The KeyEvent.VK_BACK_SLASH mentioned here in a different question is ...