Questions tagged [pipe]
157 questions
3
votes
2 answers
Linux Pipe, Warning Messages, stdout
This is probably the best place to ask the question in its simplest form. I am writing a script which takes output of a command and puts it into a variable. After some debugging I figured out the command when it errors does not goto stdout but to…

jinanwow
- 443
- 6
- 15
3
votes
8 answers
PsExec and Remote Environment Variables, Logging, Etc
When I run PsExec on a remote computer, I always fall short of what I want. What I would like ideally in most situations is a) a log on an admin server where each individual log has the name of each the remote computer it was generated from (e.g.…
alharaka
3
votes
2 answers
Pipe program output into a protected file using sudo
I want to do the following:
$ echo "secrets" > protected_file
But the the problem is, I don't have file permissions for "protected_file", so I try the following:
$ sudo echo "secrets" > protected_file
But that doesn't work either because only the…

geofflee
- 196
- 1
- 2
- 10
3
votes
2 answers
Output text file to TCP port
How can I output a text file to a TCP port on Windows Vista using built-in software? For example,
type TextFile.csv | telnet localhost 1979
This doesn't work: The process tried to write to a nonexistent pipe.

George Tsiokos
- 185
- 3
- 10
2
votes
0 answers
stream a command's stdout, and merge with terminal's stdin to a single stdout
This answer shows numerous ways to stream multiple commands into another command, but since they use subshells you can't do stdin.
While you can achieve this with named pipes, it's somewhat ugly and can leave leftover processes afterwards:
$ mkfifo…

J V
- 173
- 4
2
votes
1 answer
Starting and stopping piped processes with Supervisor
I have a situation where I pipe the output of ffmpeg into a PHP script for some processing. I might have a few of these processes running at any given time and I figured to start and stop them I might use Supervisor.
However, I'm running into the…

Luke
- 3,826
- 8
- 36
- 40
2
votes
7 answers
Running script in background without sticking to shell
i want to run a shell script remotely via ssh and the ssh shell should end when the script ends. The script itself runs another script whose output is piped to a log file.
Example:
I run the script run1.sh:
#!/bin/sh
function logpipe() {
while…
Sebastian
2
votes
3 answers
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 ideas?
#!/bin/bash
trap 'my_exit; exit' SIGINT…

Tinker
- 171
- 1
- 1
- 5
2
votes
1 answer
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 script (PHP).
I posted some of my setting details…

xil3
- 93
- 1
- 10
2
votes
2 answers
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:
somestringthatisnotnecessarilyauser: "|/path/to/php/script.php"
With SELinux…

Daniel Procter
- 33
- 5
2
votes
1 answer
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 can get mail and headers but I cannot get all of…

Sebastijan
- 31
- 2
2
votes
1 answer
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 software.
But for certain email addresses I want to…

Josh
- 21
- 1
2
votes
2 answers
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?

Till Ulen
- 123
- 4
2
votes
3 answers
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 someone doing ps would be able to see the password…

engineerchuan
- 407
- 7
- 15
2
votes
1 answer
pipe multiple files, single ssh connection, remote commands
I'd like to pipe several files to a remote server, piped as input to commands run on the remote server, over ssh, but only one ssh connection/command is permitted. (In the remote authorized_keys file, "command=..." is specified, so only one single…

grojo
- 429
- 1
- 7
- 18