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
2
votes
1answer
73 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
34 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
261 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
104 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
31 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
0answers
64 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. ...
0
votes
0answers
15 views

PIPE INTO EXISTING FILE WITH SED

I'm trying to simplify things and I have struggled to replace a couple of lines with sed in another file from the pipe. I have a mirrors.txt file with the following: cat mirrors.txt mirror1 mirror2 ...
1
vote
3answers
81 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
36 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
22 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 ...
0
votes
1answer
127 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
0answers
53 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
26 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
49 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
0answers
111 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
145 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
25 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
0answers
11 views

gegl is not piping anything to graphviz

So, I read about a parameter in the man and info pages, called --dot, for GeGL. It purportedly prints out GV data, which can be read by graphviz. However, I can't get the actual program to recognize ...
0
votes
1answer
75 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
28 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
45 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
33 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 ...
0
votes
0answers
211 views

How to send keyboard input over SSH to a TTY session?

Today I was playing around with SSH. I have a Raspberry Pi running Raspbian connected to the network, and a laptop running Arch on the same network. The Rasp is connected to a display, and has a mouse ...
0
votes
0answers
58 views

Pass pipe ' | ' as an argument to a shell script

I am working on a generic shell script perform certain operations on source files. I am taking the delimiter as an input from the user as a command line argument. It is working as expected for ',' ...
0
votes
0answers
28 views

What Windows process is responsible for creating a pipe

The software on the windows 10 based system I'm responsible for is reporting intermittent pipe creation failures. We believe this may be due to the system getting bogged down on other tasks (windows ...
1
vote
1answer
45 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 ...
0
votes
0answers
54 views

Filter ffmpeg's text output

Sorry if the question already exists, the language, and the things ffmpeg can do, make it terribly difficult to google. Because of technical limitations, I often stream using a ffmpeg script. So ...
2
votes
2answers
137 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
151 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
22 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" | ...
0
votes
0answers
33 views

Periodically log pipe data or log last processed dataset

I have a virtual private server with only a 4GB hard drive and Debian 9. Every week I want to write a 100GB log file into a database on another server. (With the help from a proprietary binary) wget -...
1
vote
2answers
582 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
47 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
vote
1answer
238 views

Pipe error in [Echo !file!|findstr]

with this script I read a Log file with filenames and search a string (with wildcards) in these list but the pipe for the findstr function doesn't work. setlocal enabledelayedexpansion for /f %%A in ...
0
votes
0answers
73 views

Piping two inputs into comm [duplicate]

I have two lists I produce using the following commands: find . -type f -name config.php -exec ls {} \; find . -type f -name config.php -exec grep --files-with-matches some_string {} \; | sort How ...
0
votes
1answer
50 views

Cygwin gawk doesn't pipe when called explicitly

That's the best description I can think of, apologies if it's a little esoteric. I have cygwin installed on Win 10, Build 16299 but it's installed with the non-administrator option; there is no ...
0
votes
0answers
24 views

Safe write to file from stdout? [duplicate]

Ordinarily typing cmd > file will overwrite the file if it already exists. I often type >> to append, but get very worried about accidentally typing > and destroying my file. Is there an ...
4
votes
1answer
145 views

Why does make ignore escape sequence if the output is piped

In a Makefile, I want to print a byte represented as a hexadecimal number and pass it to STDIN of another program. For some reason, it doesn't work: without-pipe: @printf '\x66\x6f\x6f' with-...
2
votes
2answers
920 views

mpv: how to play a list of URLs piped from stdin

Is there a way to get mpv to play a list of URLs that are piped from another command's stdout? My use case is to play all media links from an HTML page, e.g. with something like this: extractlinks....
0
votes
1answer
256 views

piping curl to tar crashes, while wget to tar is ok

When I pipe curl to tar for large files I occasionally encounter errors: jeremyr@w6:~/pelias_metal/whosonfirst$ curl -s https://dist.whosonfirst.org/bundles/whosonfirst-data-postalcode-jp-latest.tar....
0
votes
2answers
37 views

Why doesn't `2>&1` work in this pipeline?

I can't find a way to redirect error on my NAS. The shell is /bin/sh and when I use > mylogfile.log 2>&1 I still see the error printing on the terminal. The specific command is find /...
4
votes
1answer
11k views

Downloading Youtube videos in a text file…?

If you are familiar to Linux, see the following script... I have a text file with a (list.txt) of Youtube URLs separated by new line... and I use cat list.txt | youtube-dl -f best to download all ...
0
votes
1answer
86 views

Sed doesn't take file to work at

When i type grep -r string1 folder/ | cut -d ":" -f1 | sed -i -e 's/string1/string2/' it say sed: no imput files but grep -r string1 folder/ | cut -d ":" -f1 write in stdOut a list of path who ...
1
vote
1answer
12 views

Getting an argument in a specific position for further piped processing

Sometimes I need to kill a specific process which is listening on a known port in order to free that port up. When I execute sudo lsof -n -i :1084, in order to get the PID of the process listening on ...
2
votes
1answer
165 views

Limit pipe size and write to temporary file as a fallback

I have a somewhat tricky question. I want to pipe result from one command to another, but since I'm working on system with limited memory, I want to make sure that the pipe won't use too much of that. ...
1
vote
1answer
394 views

I am having trouble understanding pipes and their implememnation in xv6

I am studying Operating Systems on my own from the MOOC lectures available online and wanted to work on xv6. I was reading the Documentation on xv6 and in chapter 0 when it is talked about pipes (pg. ...
15
votes
3answers
2k views

What does the last “-” (hyphen) mean in options of `bash`?

In this tutorial we need to execute the following command: # curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash - What does the last - (hyphen) after bash mean? I've seen a lot of ...
1
vote
1answer
581 views

How can I use a “here document” in the middle of a pipe?

I am wanting to generate some content using a heredoc as a template: passphrase=$(<passphrase) envsubst <<EOF apiVersion: v1 kind: Secret metadata: name: openshift-passphrase stringData: ...
4
votes
2answers
2k views

How can I redirect output from stdout into vim? [duplicate]

I would like to view the output of echo in vim, and save to a file after having a look at it. I have tried echo $PATH | vim, but I get the following error: Vim: Warning: Input is not from a terminal ...

1
2 3 4 5
8