1
vote
2answers
88 views

Pass a command to ROOT from a shell script and having it stay open

I am writing a bash script to perform some analysis using the program ROOT. I want to run some initial command to load the result of the analysis, then continue using ROOT interactively. The analysis ...
2
votes
2answers
89 views

How to clear the input in Bash

I have a bash script that is reading quite a bit of data /dev/random. I need the user to type randomly to seed the random daemon. However once the script completes everything typed will get dumped to ...
2
votes
1answer
70 views

Grabbing keyboard control in shell script

I have a certain shell (zsh) script which reads one character at a time and performs an action afterwards. In the shell, this is realized by "read -k" in a loop. I want to execute the script as a ...
4
votes
1answer
2k views

SSH causes while loop to stop

I have finally managed to boil down a problem I have been struggling with for a few weeks. I use SSH with "authorized keys" to run commands remotely. All is fine except when I do it in a while loop. ...
7
votes
1answer
593 views

Bash script doesn't read input

I have a script that is suppose to run a command in the background, and it does that. The problem is that when the script comes upon a read command, it doesn't pause and accept input. Here it is: ...
8
votes
4answers
12k views

How to inject keystrokes via a shell script?

I'm trying to inject keystrokes into the input daemon so as to simulate typing from a Bash script. Is this possible, and if so, how can I make it happen?
3
votes
2answers
4k views

How to catch optioned and non optioned arguments correctly?

I want to write a shell script which will take some arguments with some options and print that arguments. Suppose the name of that script is abc.ksh. Usage of that script is - ./abc.ksh -[a ...