Skip to main content

Questions tagged [pipe]

A Unix pipe connects file descriptors of two processes. A pipe is created with the POSIX pipe() function declared in <unistd.h>. Shells provide pipe creation between processes using "|".

0 votes
1 answer
58 views

I just wanted to build a simple bash script that inverted a 'hex color code' (made up of 3 pairs of 2-digit hexadecimal numbers, in the format #RRGGBB). In my first code block I attempt to perform ...
Signor Pizza's user avatar
9 votes
4 answers
666 views

From time to time I need to do a quick check of contents of an Ultrium tape, which can store even 6TB of data. To avoid reading the entire tape, I used to perform following procedure (in a loop): $ ...
Michal's user avatar
  • 139
3 votes
1 answer
218 views

I'm using Amazon Linux 2023 dnf check-release-update --version-only 2023.9.20251027 2023.9.20251105 now I want grep output but it does not work dnf check-release-update --version-only | grep "...
Alexander Pavlov's user avatar
2 votes
5 answers
893 views

I have built a Visual Studio solution, containing 92 projects. While building them, I get the following line for every one of them: 10>------ Rebuild All started: Project: HostLinkSw, Configuration:...
Dominique's user avatar
  • 401
4 votes
2 answers
545 views

Suppose you have this script, on an Ubuntu machine: #!/bin/env python3 import sys import time try: i = 1 while True: print(i) i += 1 except Exception as e: sys.stderr.write(f"We ...
eftshift0's user avatar
  • 785
0 votes
0 answers
35 views

I wanted to use tee /dev/tty to look into the stream passing through a pipeline. While making some tests, I observed the following: ~$ cd /proc/self/fd /proc/self/fd$ ls 0 1 2 255 # Ok /proc/self/...
The Quark's user avatar
  • 454
3 votes
1 answer
460 views

I don't understand the following: $ cat <(sleep 60) & jobs -l [1] 63813 [1]+ 63813 Running cat <(sleep 60) & /proc/63799/fd$ ps --forest PID TTY TIME CMD ...
The Quark's user avatar
  • 454
-1 votes
1 answer
112 views

Let's say I use Apache, and that I am in /var/www/html/. I do: mkfifo test.tar tar cvf - ~/test/* > test.tar & In a browser, when trying to download http://localhost/test.tar I get: ...
Basj's user avatar
  • 2,649
0 votes
0 answers
42 views

I'd like to only see those lines containing "Stream #" from an ffprobe output. But whatever I do, it continues to show the whole output. Neither "|" nor ">" pipes work....
Gary U.U. Unixuser's user avatar
5 votes
3 answers
574 views

I'm processing input data in a pipeline consisting of several programs. In one step of the pipeline, I want to know if there are certain lines in the input, but I want to output everything as-is ...
bitmask's user avatar
  • 1,256
0 votes
2 answers
102 views

The following question likely does not relate specifically to Vim. I use a Vim example, as this is where I encounter the issue. Working on Ubuntu, I often open multiple files in Vim using tab pages: $ ...
user7543's user avatar
  • 266
10 votes
3 answers
2k views

I use the Git Bash on Windows, and stumbled over a strange behaviour. When I execute this command, it creates an empty file: echo hello | > hello.txt (hello.txt is empty after this command) I ...
daniel kullmann's user avatar
0 votes
2 answers
211 views

I have to run four separate if statements (and their consequences) on one command output continuously as it updates (doing four different things based on four different strings which might be in the ...
Gridzbi Spudvetch's user avatar
0 votes
1 answer
121 views

The urgent issue to read keyboard input in the pipeline is solved by the answer in https://stackoverflow.com/questions/15230289/read-keyboard-input-within-a-pipelined-read-loop: mycommand-outputpiped |...
Martian2020's user avatar
  • 1,501
3 votes
2 answers
191 views

This is best illustrated with an example I feel: { printf 'foo\nbar\n' ; sleep 2 ; } | grep -m1 foo { printf 'foo\n' ; sleep 2 ; printf 'bar\n' ; sleep 2 ; } | grep -m1 foo Both of these commands, ...
Zorf's user avatar
  • 171

15 30 50 per page
1
2 3 4 5
126