Linked Questions
12 questions linked to/from Process substitution and pipe
0 votes
1 answer
969 views
Understanding the "process substitution" concept [duplicate]
I seek a simple explanation about the term "process substitution" aimed for general audience / non professional sysadmins, which do server environment maintenance for personal projects once ...
1 vote
1 answer
189 views
What does <(command) do? [duplicate]
I was reading this script someone wrotte and there is this line: comm -23 <(grep cat access.log) cats | mailx -s subject [email protected] I understand it to mean convert this output as if it was ...
13 votes
4 answers
9k views
bash can't store hexvalue 0x00 in variable
I'm trying to do some tricks with dd. I thought it would be possible to store some hexvalues in a variable called "header" to pipe it into dd. My first step without a variable was this: $ echo -ne ...
13 votes
2 answers
5k views
Performance difference between stdin and command line argument
For some commands, it is possible to specify certain input as either stdin or a command line argument. Specifically, suppose command can take stdin input and a filename as command line argument, and ...
3 votes
3 answers
3k views
Processing a single file as both input and output throughout pipes [duplicate]
Good evening, I would like to filter a file's content with some piped commands and then write the result back to the same file. I know, I can't do that the way I wrote it. Hold on … This is the ...
3 votes
2 answers
1k views
Difference between piping and command expansion
This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said. What is the difference between piping command1 ...
2 votes
2 answers
1k views
Redirecting from right to left
From old habits, I'm always redirecting "from left to right", eg. cat file | bar foo | bar I've noticed you can redirect "from right to left". However, is it possible to do this for the second form (...
2 votes
1 answer
442 views
Executing a remote script from a code repository causes endless loop
I often execute raw versions of remote Bash scripts in GitHub with this pattern: wget -O - https://raw.githubusercontent.com/<username>/<project>/<branch>/<path>/<file> | ...
0 votes
1 answer
530 views
Pipe output of two commands into another script as arguments
ntopng can handle multiple network interfaces and I've a script that takes the name of the interface and outputs it in to stdout. I can pipe this output into ntopng my_packet_tracer.sh | ntopng -i - ...
0 votes
4 answers
286 views
Bash - move/rename numeric sorted files from input number onwards [duplicate]
I have a numbered list of files like this: 01_file_name.log 01_file_name.txt 02_file_name.log 02_file_name.txt 03_file_name.log 03_file_name.txt 04_file_name.log 04_file_name.txt 05_file_name.log ...
2 votes
1 answer
241 views
Find all git repos that do not contain any one of .gitignore and .gitattributes
I basically want to find all git repos that have neither a .gitattributes nor a .gitignore file at the root. I used find . -type d '!' -exec test -e "{}/.gitignore" ';' -print to find it but it lists ...
1 vote
1 answer
57 views
`pushd` inside a while loop from file contents does not behave the same depending on read method [duplicate]
I'm pushing directories to my stack using a while loop that reads the contents of a file. I've tried two approaches that should be equivalent, but they behave different. Approach 1 export ...