Find the answer to your Linux question:
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.
  1. #1
    Just 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,

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Hello and welcome!

    I have moved your post to the Programming/Scripting forum, where it will hopefully get more helpful eyes on it.

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    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.

  4. #4
    Just Joined!
    Join Date
    May 2007
    Posts
    2
    Thank you soo much!!That link was so useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •