Questions tagged [pipe]
156 questions
0
votes
1 answer
Are bash pipes lazy or eager?
I was watching this command run
tar cf - 20180412 -P | pv -s $(du -sb 20180412 | awk '{print $1}') | gzip > 20180412.tar.gz
9.02GiB 0:01:20 [ 114MiB/s]…
![](../../users/profiles/123523.webp)
jperelli
- 223
- 5
- 10
0
votes
1 answer
set up master slave over ssh and port pipe for a Mysql replication
Everything started when I was asked to set up a syncing method for our Mysql server. Considering that I am a developer I got into deep waters first with DBA and now I found myself into SysAdmin.
So I need to connect from a remote server (slave,…
![](../../users/profiles/463309.webp)
Skaros Ilias
- 131
- 5
0
votes
2 answers
Large mysql dump pipe to s3
Is there any problem in doing this with lots of data?
mysqldump ... | gzip | s3cmd put - s3://bucket/file.sql.gz
The MySQL dump is about 100GB in size. What happens if gzip or s3cmd can't process the dump fast enough? Will it overflow the pipe…
![](../../users/profiles/278710.webp)
John W. Nesk
- 3
- 1
0
votes
2 answers
Streaming stdout
I have a script that outputs a lot of debug data that I would like to avoid to save on disk (specially since the file system is on a flash memory card). So I run it on the background with nohup + & disposing stdout and stderr to /dev/null.
But when…
![](../../users/profiles/229047.webp)
Sdlion
- 101
- 2
0
votes
0 answers
Remote packet capturing using fifo and dumpcap
I'm currently working on two linux servers where one server is running in 2.6.18-274.el5(Server A) and the second one in CentOS 7 (Server B).
My requirement is to capture the packets of the network interface of Server A from the Sever B. For that…
![](../../users/profiles/259423.webp)
BAdhi
- 111
- 6
0
votes
2 answers
Unzip piping order
I have a file, foo.zip which looks something like this:
foo.zip
-- fileA.txt
-- fileB.txt
I can pipe the output of the extracted files like this:
unzip -p foo.zip *.txt | something
My problem is that I want to make sure that the files are in the…
![](../../users/profiles/71390.webp)
Grav
- 115
- 4
0
votes
2 answers
Powershell pipe exporting to csv is loosing data
I'm trying to write a script that will take input from a .txt file of IP address. Do a reverse DNS lookup to get the hostname of the IP address and then export that data into .csv file.
Here is what I have so far.
# getting the IP's from the…
![](../../users/profiles/213517.webp)
Douglas Francis
- 83
- 2
- 9
0
votes
1 answer
How to comma-demilit the output from cut?
So far, I have this:
grep -B 36 'pattern1' Mapper.1.Configuration.MapRules | grep "pattern2" | cut -d'"' -f2
which give me a new-line delimited list of values that I need. I could put this into a file and then do a find and replace of all new-lines…
![](../../users/profiles/62550.webp)
Ramy
- 117
- 1
- 7
0
votes
2 answers
pipe raw email message to python script
In exim4, I use following pipe to send a message to a python script, process it, and upload it to django:
send_to_django_mailbox:
driver = pipe
command = /usr/local/bin/python /etc/exim4/conf.d/transport/send_mail.py $message_body …
![](../../users/profiles/18036.webp)
vikingosegundo
- 135
- 1
- 9
0
votes
6 answers
How to recursively search and replace from command line on unix/linux system
So I want to change several files at one with one command. This is what I have so far:
find -regex ".*\.ext$" | xargs grep -l searchText 2> /dev/null | xargs -i sed 's/searchText/replaceText/' > {}.new
What it does:
I find files with extension ext,…
![](../../users/profiles/7999.webp)
Keith Bentrup
- 699
- 3
- 8
- 19
0
votes
2 answers
Procmail - Replace From with text from within email
I am trying to use Procmail to filter through mail that goes to my ticket channel in WHMCS. It works fine as far as piping goes. But emails from the Zopim live chat module on the site need filtering and editing before they go to the script for…
![](../../users/profiles/135111.webp)
jfreak53
- 188
- 1
- 3
- 25
0
votes
1 answer
Tell Postfix to pipe From certain emails to certain scripts
I am currently using Postfix to pipe incoming email form our support email address to our WHMCS install to the support department. This has been working great for sometime. Problem is now we have a live chat widget, and when someone sends an offline…
![](../../users/profiles/135111.webp)
jfreak53
- 188
- 1
- 3
- 25
0
votes
6 answers
How to run command on parts of input file
I have ~ 40GB file, and a filter command that for some reason breaks when I try to run it on the file (even when passed via pipe).
But. It doesn't fail when I split input file into many small files, pass each of them via the filter, and concatenate…
user13185
0
votes
2 answers
Postfix piping to php issue: "cannot append message to file: cannot open file: Permission denied"
I am having some issues with setting up piping to a php app (WHMCS).
The mail is coming to the server however it is bouncing.
The maillog shows:-
May 15 12:51:14 hostname postfix/smtpd[2123]: connect from mail-wi0-f177.google.com[209.85.212.177]
May…
![](../../users/profiles/173801.webp)
user173801
- 3
- 4
0
votes
2 answers
Netcat output pipe, json parsing
What I want is this:
netcat to the server, which streams json formatted loglines.
pipe the output of nc to "something" that will format the json as plaintext, in a customizable format (thinking something like perl or python here).
allow "something"…
![](../../users/profiles/121746.webp)
c0dem4gnetic
- 165
- 7