OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: bam on November 11, 2005, 04:59:03 am

Title: Script
Post by: bam on November 11, 2005, 04:59:03 am
how do I request a keyboard input wait for that input then use that input and pass it as a variable?
Title: Script
Post by: zmiq2 on November 11, 2005, 06:20:18 am
I assume you are thinking about doing an input from a bash script. If not, forget about this solution:

echo -n "Enter input:"
read inputLine
echo "your input was: $inputLine"

HTH
Title: Script
Post by: bam on November 11, 2005, 06:34:27 am
yes, bash. I am going to have this at the end of rc.rofilesys to decide the runlevel, so as to boot to debian or qtopia. Then the next step is to figure out how to login as root (automatically) when terminal ocmes up, then run Vncserver and Fbvnc.
Title: Script
Post by: bam on November 12, 2005, 02:37:12 am
one more quick question, how can I set a "timer" to just do an action after it waits for an input, example, it asks for a runlevel, if you dont answer in say 5 seconds it sends a default value along.