1
vote
1answer
28 views

Identify python script is waiting for a manual input

I'm writing a shell script which executes a Python script. The Python script halts for a manual enter to be provided. However, I don't wan't to have to press enter each time to the script. Instead, I ...
13
votes
5answers
481 views

Stateful bash function

I’d like to implement a function in Bash which increases (and returns) a count with every call. Unfortunately this seems non-trivial since I’m invoking the function inside a subshell and it ...
1
vote
1answer
360 views

Changing text color in c-shell

I can change the text color in the terminal permanently by adding this: export PS1="\e[0;31m[\u@\h \W]\$ \e[m" to the .bashrc file. Now I have to go into cshell, what is the corresponding way?
3
votes
2answers
120 views

Asynchronous RPROMPT?

A friend of mine posted this on StackOverflow, and I thought we might be more likely to get an answer here. His post refers to speed, but we now know that the python script we are using to parse git ...
4
votes
1answer
304 views

Prompt for confirmation for every command

I'm writing a pretty ad-hoc install script for some thing. No much control constructs, basically just a list of commands. I'd like the user to confirm each command before it gets executed. Is there a ...
2
votes
1answer
356 views

Prompting for input in post-install script in dpkg

I am writing a debian package and need to prompt the user for some textual details(default password, etc), as well as some one-of-many choices("Pick one of the following: foo, bar"). Will shell ...
27
votes
5answers
2k views

Better way of accepting variations of ‘Yes’ from a shell prompt

Usability testing of a shell script I wrote found that people had different expectations on how to answer a question that expected ‘yes’ as the answer. See variations in the below code example. ...