Results 1 to 4 of 4
Hi ,
I need a shell script program to detect if a tab key is pressed.
I used read to read -n1 to read a character but how do i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-07-2013 #1Just Joined!
- Join Date
- May 2007
- Posts
- 2
Tab press in shell script
Hi ,
I need a shell script program to detect if a tab key is pressed.
I used read to read -n1 to read a character but how do i check if it is a tab?
Thanks in advance
Regards,
- 02-08-2013 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
Hello and welcome!
I have moved your post to the Programming/Scripting forum, where it will hopefully get more helpful eyes on it.
- 02-08-2013 #3Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
Take a look at the clever example of how to do that in Bash here. Scroll down to the example labeled Example 5-3. Detecting key-presses. Give it a whirl and post back here if you can't get something scripted to work for you.
- 02-08-2013 #4Just Joined!
- Join Date
- May 2007
- Posts
- 2
Thank you soo much!!That link was so useful


Reply With Quote
