The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
62 views

BASH: alternatives to coproc [closed]

I have some scripts which use coproc to control stdout/stdin of subprocesses. Unfortunately, coproc was introduced in Bash 4.0, and on many systems I use, there is an earlier versions of bash. Are ...
3
votes
2answers
184 views

Should a foreground program invoked by a daemon split logging between stderr and stdout based on severity levels?

Usually log messages are written to stderr. I'm wondering if it is a good idea/practice to split log messages so that errors and warnings go to stderr while debug/informational/notice messages go to ...
0
votes
2answers
125 views

Sudo seemingly not obeying -S parameter

I am running some scripts as part of pre/post deploy using DeployHQ, I need to be able to call the script on one line and for there to be no feedback from the terminal so I want to pass the password ...
0
votes
1answer
575 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 ...
1
vote
1answer
758 views

Write to stdin of a running process using pipe

I am in a similar situation as in this post But I couln't get the solution provided there to work in my situation as the answer seems related to that question only. In particular, I couldnt ...
0
votes
2answers
147 views

“Bad File Descriptor” error using Python/CGI in IIS 6.1

Background: I've attempted (strong emphasis on "attempt") to set up an application via IIS (6.1, Windows Server 2008 R1) that routes all requests through a python script. The end goal was to create ...
1
vote
1answer
117 views

Write to the stdin of a running process (without changing the way of starting the program) [closed]

In this post there is described how to start a program and then to send data to the stdin of the program (with FIFOs). But what to do if the program is already running, and I cannot re/start the ...
6
votes
2answers
406 views

Write to the stdin of a running process with the same effect/behaviour of directly writing

This post answers only partial my question. My problem is that writing to the stdin of the running process using the FD of process on the /proc filesystem does not have the same effect. Problem: ...
0
votes
2answers
225 views

Unix wrapper to make any binary accept stdin/stdout redirection

This is a common situation: you want to include command 'foo' as part of a pipeline, but unfortunately command 'foo' only accepts actual filenames for I/O and does not read/write from stdin/stdout. I ...
1
vote
1answer
173 views

How to feed the variable with end of lines to standard input of other application in bash?

Is there a (simple) way to feed variable with end of lines to other program in BASH? Consider example: flist=$(ls -l) echo $flist echo will replace all end of lines with spaces, so my output will ...
3
votes
4answers
318 views

Prevent sudo, apt-get, etc. from swallowing pasted input to STDIN?

I often write up wiki instructions to install various server packages on Ubuntu (11.10 Oneiric at the moment). They always involve things like: sudo apt-get install -y postfix sudo cp ...
1
vote
2answers
863 views

Passing scripts to ssh and invoking the shebang

I have scripts in several languages which I pipe to ssh to have them invoked on other hosts. For shell scripts I'm able to do this: ssh < /path/to/script.sh For scripts in other languages ...
0
votes
2answers
226 views

Gitosis-init returns “Fatal Python error: <stdin> is a directory”, why is this?

I'm trying to get gitosis installed because I want to use Indefero and I need a deamon for the git:// protocol. However, following the instructions in the Git Pro book ...
2
votes
1answer
492 views

CentOS 5.3, Perl, bash commands, Hide ALL output to screen

I am running the following command: [user@server ~]$ /usr/sbin/ntpdate -d IPREMOVEDFORSECURITY | egrep 'transmit timestamp' | tail -1 | awk '{print $4, $5, $6, $7, $8}' host found : ...
2
votes
2answers
520 views

Bash Parallelization of CPU-intensive processes

tee forwards its stdin to every single file specified, while pee does the same, but for pipes. These programs send every single line of their stdin to each and every file/pipe specified. However, I ...
4
votes
2answers
5k views

Writing to stdin of background process

I'm on an Ubuntu 10.04 box, and started a server in the background (myserver &) over ssh. It's been running fine, but I need a way to get at the server's stdin, as the only way to control the ...
15
votes
3answers
7k views

Can I send some text to the STDIN of an active process running in a screen session?

I have a long-running server process inside a screen session on my Linux server. It's a bit unstable (and sadly not my software so I can't fix that!), so I want to script a nightly restart of the ...
3
votes
4answers
2k views

Testing for a script that is waiting on stdin

Is there a way to determine if a script is waiting on stdin and cause the command to exit if detected? Here's an example, the command I'm executing takes a long time to run, but it will also prompt ...
0
votes
3answers
589 views

An SQLite/STDIN Conundrum, Specific to AIX

I'm been playing around with SQlite at work, specifically with trying to get the sqlite3 command line tool to accept stdin instead of a file. Sounds easy enough, on linux you can execute a command ...
2
votes
1answer
608 views

How can I use scp without providing a password

I have asked a question before in here. My question was that I tried to give my password to scp via piping echo mypassword | scp tim@xxx.xxx.xxx.xxx:project/* ~/project/ However it still asks me ...
0
votes
3answers
2k views

Suppress GPG “Reading passphrase from file descriptor 0” message

Simply, how can I make GPG not print that message? Here are the commands I'm using: echo "test input" > test.in echo "test" | gpg -q -c --passphrase-fd 0 --output test.enc --yes --force-mdc ...