I'm wondering what creates /dev/stderr on FC14. rpm -qf doesn't show any package ownership. I've dug through the init scripts and can't find it anywhere.
To provide some context, I'm creating a chroot'd jail to start with lxc.
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 for input before starting w/o a prompt. I want to know the command is actually doing something and not just waiting.
Provided the following script called ./demo
#!/bin/bash
read
Is there a way to detect that read is waiting on stdin? Something like
failifwaitingonstdin | ./demo
Which would immediately return as soon as the read command was detected.
Updated:
Folks have suggested programs like expect and yes. After digging through yes, I see how they're able to support this style of interaction. They're constantly using fputs to write 'y' to stdout. Instead of doing this infinitely, I can simply return an error as soon as fputs returns on a write to stdout.
I have a file "in" that contains:
a
b
c
I run the following command:
cat in | while read el; do select yn in "yes" "no"; do echo $yn; done; done;
And get the following output:
1) yes
2) no
#?
#?
#?
What I want is to be able to type 1 or 2 at each iteration. What do I need to do differently to make this work?
Is there a way to execute ps ax | grep java
without it wrapping on the terminal?
I want to plug a laptop into my server instead of using a switch.
When I check the button on my MacPro OSX 10.5.8 to share my internet connection on my second nic, it warns that it may affect other computers on the network and to contact my system administrator. Is this just a warning to keep the uninitiated at bay, or is there something with bonjore that may cause problems?
Which profile, .bashrc or .bash_profile, is the appropriate spot for ssh-agent? I'm looking for an answer that explains the different between an interactive shell and a login shell.
I haven't cracked open the source code yet, but I was curious which whois service the traceroute program uses to look up ASNs for a given IP.
I need to track Jitter and Packet Loss over a MPLS line. What's the most accurate way to capture this information without interfering with the data being sent back and forth?
Is SmokePing the best tool for the job or is there something better?