Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
shellscript help
Name: J Date: September 25, 2003 at 13:27:59 Pacific OS: Unix CPU/Ram: 256
Comment:
How can I write a shellscript to accept a character from the terminal as soon as it is typed (don't wait for user to hit return)?
Name: Nails Date: September 25, 2003 at 13:48:49 Pacific
Reply:
There's really no way of doing it without changing the unix terminal driver which this function does:
#!/bin/ksh
readkey() { oldstty=`stty -g` stty -icanon -echo min 1 time 0 dd bs=1 count=1 <&0 2>/dev/null # the line above reads after count=1: # less than sign, ampersand, space, # the number 2, greater than sign, # /dev/null stty $oldstty }
Summary: Hi, I posted a message a couple of days ago asking for some help with a Bourne shellscript, and I have now written some code, but am getting an error, which is "shellscript.sh: syntax error at line 33...
Summary: Hi, I was wondering if anyone could help me – if they could I would be extremely grateful! Basically, I want to write a Bourne Shellscript program that allows a user to backup a directory and all the ...
Summary: nails, my program should follow a general syntax: -s for displaying contacts specified, -a creates contact aking for nickname, firstname,lastname and number of the contact; -d for deleting a contact;...