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
38 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
3 votes
1 answer
208 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
4 votes
2 answers
525 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
3 votes
1 answer
450 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
0 votes
0 answers
38 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
0 votes
2 answers
88 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
0 votes
2 answers
187 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
3 votes
2 answers
167 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