The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
23 views

Pipe multiple files into one tar gz

I'd like to call mysqldump to create multiple backup files and then archive them in one tar.gz. I am following this tutorial on mysqldump part: ...
0
votes
2answers
26 views

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 ...
3
votes
1answer
46 views

does email pipe to program cause problems with unicode characters?

I'm piping incoming mail into a PHP script, immediately storing the RAW email in a MySQL db. It works very well, except ~0.7% of emails arrive with a truncated message body. I found someone whose ...
0
votes
0answers
13 views

pipe rrd to a new directory

I am chrooted and running out of drive space, so I mounted back to the host drive which has plenty of space but cannot seem to pipe the outputted data to my empty drive [root@localhost rra]# ls ...
-1
votes
3answers
155 views

Can't pipe echo to netcat?

I have the following command: echo 'HTTP/1.1 200 OK\r\n' | nc -l -p 8000 -c and when I curl localhost:8000 I am not seeing HTTP/1.1 200 .. being printed. I am on mac os x with netcat 0.7.1 Any ...
1
vote
1answer
101 views

Exim4 setup not working with piping

I'm trying to setup exim4 on the server, so that it can receive mail for a couple sub domains, and I want to pipe that to a PHP script. I want all incoming mail to be processed through my custom ...
0
votes
2answers
193 views

how to pipe a mysql dump to s3cmd

I want to transfer a mysql dump, compressed, to s3. I tried: mysqldump -u root -ppassword -all-databases | gzip -9 | s3cmd put s3://bucket/sql/databases.sql.gz but then I get: ERROR: Not enough ...
0
votes
1answer
35 views

Cat pipe mysql : Stopped. What stopped and how can I fix that?

I imported a large database from remote using a cat + mysql command : cat my_db.sql | mysql --host=external_host --user=my_user --password=some_password my_database And after some time, it returned ...
1
vote
5answers
148 views

How to split the output into different files?

I have a input file like foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz foo xxx yyy zzz bar xxx yyy zzz bar xxx yyy zzz foo xxx yyy zzz .. How to split the input file by line, into foo.txt ...
0
votes
1answer
80 views

Postfix Pipe then forward to original recipient

I may well be on the wrong track here with what I'm trying to do, so I'd appreciate any advice. Is it possible to pipe email to a script (which I have working), and then have Postfix forward it on ...
0
votes
2answers
177 views

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 ...
2
votes
2answers
347 views

SELinux preventing /etc/aliases email pipe to script from working

When somebody sends an email to my server, e.g. somestringthatisnotnecessarilyauser@myserver.com I want it to pipe to a PHP script. So in my /etc/aliases file I have: ...
0
votes
1answer
43 views

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 ...
1
vote
2answers
69 views

how to pipe results from LS to CD in ubuntu

I'd like to ls for the latest created directory in a given directory (we create a new folder for each release) and then cd to that directory. I'd like to create an alias for this so I don't have to ...
-1
votes
1answer
86 views

Make a copy of email using pipe in postfix alongside 1 content_filter

I am using postfix and already usHi. I am using postfix and already using a script as a content_filter which re-injects back to smtpd to all users, but before this happens, I would like to make a copy ...
0
votes
2answers
376 views

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 ...
7
votes
5answers
420 views

Grep-ing gzipped files [duplicate]

I have a set of 100 log files, compressed using gzip. I need to find all lines matching a given expression. I'd use grep, but of course, that's a bit of a nightmare because I'll have to unzip all ...
0
votes
1answer
1k views

Postfix: Pass a copy of an email to a script but deliver the original one to mailbox

It's actually quite simple: I want to pass all incoming emails to a PHP-script, but only as a copy, the original email shall still be delivered to the mailbox as usual. I just can't seem to get it ...
0
votes
2answers
177 views

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 ...
0
votes
1answer
73 views

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 ...
2
votes
1answer
48 views

Postfix - Transferring NOTIFY command to script using pipe

I have set up system where all mails are piped to my script. In master.cf I have: phptran unix - n n - - pipe flags=DFORq user=nobody argv=/usr/bin/php5 /root/phptran.php ${sender} ${recipient} I ...
0
votes
2answers
509 views

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]: ...
0
votes
2answers
298 views

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 ...
1
vote
1answer
995 views

postfix pipe to script: execvp permissions denied error

I am new to postfix and am trying to pipe a message to a particular email address to a bash script. I am running CentOS 6 in case that matters. My script has 777 permission (for testing), and when I ...
0
votes
1answer
306 views

Postfix sendmail sets original recipient

I have a postfix + dovecot with a spamassassin doing some content filtering on the postfix side. The problem is that with a recent update the originally available sendmail binary was replaced with the ...
1
vote
1answer
101 views

Can I use MX records to deliver some addresses to Google Apps and some to my server?

I have whm installed on my VPS, which my domain MX records are pointing to: 0:mail.mydomain.com and whm/cpanel has mail forwarding rules which pipes certain @mydomain email addresses into my CRM ...
1
vote
1answer
398 views

Postfix won't pipe to PHP file through aliases file

I'm trying to pipe from postfix to a command. According to Postfix logs it worked, but when I check the command it didn't. This is a fresh postfix install. This is my alias file: # See man 5 aliases ...
0
votes
1answer
1k views

reading stdin in shell

#!/bin/sh #myVar=`date`#case 1 #myVar=`cat /dev/stdin`#case 2 myVar=($(< /dev/stdin)) #case 3 echo $myVar exit 2 case 1 works case 2 and 3 don't work. When I test with either 2 or 3; there is no ...
0
votes
1answer
847 views

file transfer with ssh pipe; without scp

Scenario: I'm having about hundred odd text files which are compressed as .gz. They need to be transferred to a remote server. I do not want to use scp. Both, linux servers. my requirement/my idea: I ...
2
votes
2answers
148 views

Adding a progress bar to a data pipe

Are there any alternatives to pv? I'd like to see the current transfer rate of a data pipe, a progress bar and an estimated completion time. Any other tools that can do that?
1
vote
2answers
341 views

nginx - log access and error to pipe and use multilog to log rotate

What I am trying to do: Log rotate nginx access and error log using multilog My approach: Log nginx access and error to a pipe, so I can have another process that runs multilog that reads from that ...
3
votes
8answers
986 views

Redirect all incoming mail into a script

I have no idea about Mail Delivery. but i need redirect ALL incoming e-mail (*@mydomain.com) into an a php script. i'm using debian Exists a simple mail server to do this? (without exim, postfix, ...
0
votes
2answers
229 views

Skipping a “Press certain key to continue” in a bash script

I'm installing RVM for Ruby with the following command: curl -L https://get.rvm.io | sudo su myuser -c "bash -s stable --rails" I specifically need it to be installed under that user - and it will ...
0
votes
2answers
506 views

Postfix bounce local delivery with source address from orig_to

I am creating a python script to deliver local mail using various means. The problem is this: This script has to accept multiple virtual domains defined in /etc/postfix/virtual The script does the ...
1
vote
1answer
574 views

WATCH command with pipes

Hithere, how do I watch this command: netstat -plan|grep :80|egrep -v "(:8082)|(:8080)|(:8081)"|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -n It errors out when surrounding it with single/double ...
2
votes
1answer
231 views

transparent signals over ssh

By transparently I mean forwarding of: stdin, stdout and stderr standard signals (SIGHUP or SIGINT would be great for a start) As an example, consider these invocations of a (pointless) local and ...
1
vote
2answers
307 views

Continual tailing and sorting of multiple files on linux?

Is there a way to use pipes or FIFO in combination to continually monitor several (same format) log files whilst sorting on the first field and then being able to effectively do a tail -f on that ...
2
votes
1answer
628 views

pipe from tar to ftp

I have ftp access to a server I do not control. I'd like to start sending archives of my server's FS to that ftp. The problem is I don't have enough free space on my system to create a backup archive ...
0
votes
1answer
1k views

Postfix “mail-to-script” pipe only delivers empty messages

i have a problem here. I want that a incoming email is piped to a php script in the system through postfix. My System is running with ispconfig 3, postfix and dovecot (< virtual mailbox users are ...
7
votes
3answers
3k views

how to pipe data to sftp connection?

ftp supports the put "|..." "remote-file.name" command to pipe data to an ftp connection. Is there something similar available for sftp? In sftp i get the following error: sftp ...
3
votes
6answers
1k views

Pass a pipe to a command that expects a filename

Say I have a command foo which takes a filename argument: foo myfile.txt. Annoyingly, foo doesn't read from standard input. Instead of an actual file, I'd like to pass it the result of another command ...
0
votes
1answer
1k views

syslog-ng not flushing the pipe to external program (SOLVED)

I have written a python script that takes log entries from syslog-ng and writes them to MongoDB (I couldn't do it with afmongodb driver because I need to do some special processing). This is how it ...
18
votes
1answer
1k views

Shell command slow when using pipe, fast with intermediate file

Does anyone understand this huge difference in processing time, when using an intermediate file, or when using a pipe? I'm converting tiff to pdf using standard tools on a fresh debian squeeze server. ...
2
votes
2answers
2k views

Why is this tee losing stdout?

Simple script: #!/bin/bash remote_ssh_account="depesz@localhost" directory_to_tar=pgdata exec nice tar cf - "$directory_to_tar" | \ tee >( md5sum - | \ ssh ...
4
votes
1answer
198 views

How to concatenate streams?

I know cat can concatenate files, but I need to concatenate a mix of files and streams and pipe the result to another process. To make the question more concrete, I want to concatenate cat abc.sql ...
1
vote
3answers
140 views

Why is ``head`` hanging and not terminating?

I have a shell script that has to find the newest file on a remote host. I have this bit: ssh -q $HOSTNAME -t ls -t -1 /path/to/somewhere/ | head -n 1 It prints the first line, then waits and ...
2
votes
3answers
135 views

is it safe to pass passwords in plaintext to a script if you use subshells?

I have a script and it does a read -p to a variable named PASSWD: smbclient -L 192.1.1.1 -U username%$PASSWD I believe that I won't be able to see this in the history. On this link, it says that ...
-1
votes
1answer
160 views

why does pipebackand always return ANY qtype?

when sent a query dns to pdns with type equal A , the latter sent to pipe backend using pipe protocl and qtype always egual ANY why?i use powerdns 2.9.22 and my os is ubuntu thank you in advance
0
votes
1answer
358 views

Enabling Pipe(|) functionality with Postfix for a .forward file

I'm running into an issue trying to get pipe forwarding working on postfix. Rather than running the script I'm intending to run, it's appending to my script. Testing on other servers this seems to ...
0
votes
1answer
217 views

Postfix, set privileges for piping

I configured postfix on my box to call a php script on incoming e-mails, using virtual aliases. The script is being called, but it runs as "nobody" and thus I can't send signals to another program ...