Sponsored Content
Full Discussion: Bash read with -p option
Top Forums Shell Programming and Scripting Bash read with -p option Post 303022376 by Chubler_XL on Thursday 30th of August 2018 10:41:24 PM
Old 08-30-2018
Press any key:
Code:
read -rs -n1 -p "Press any key" < /dev/tty

Press q to quit from processing loop - non blocking
Code:
echo "Press q to quit"
while true
do
    read -rs -n1 -t 0.1 < /dev/tty
    [ "$REPLY" = "q" ] && break
    # ... your stuff here
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

2. Shell Programming and Scripting

Find in Bash with -a option

Hi, The proble is below: Assume i have files starting from "process" then date/time then ".log". ex . process.20100504092942.log process.20100503152213.log process.20100430144217.log process.20100429153644.log process.20100428121200.log process.20100427130746.log... (2 Replies)
Discussion started by: meetvipin
2 Replies

3. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

4. Shell Programming and Scripting

Request for file read option in Unix shell scripting

Hi Friends, I would like to read all the record from one txt file to other file txt For example I have two txt file a.txt and b.txt. I need to read a.txt record by record and I need add the system date @ end of each record before moving it to b.txt. Could you please share the coding for... (4 Replies)
Discussion started by: vinoth124
4 Replies

5. Shell Programming and Scripting

Help with Bash piped while-read and a read user input at the same time

Hi I am new to writing script and want to use a Bash Piped while-read and read from user input. if something happens on server.log then do while loop or if something happend on user input then do while loop. Pseudocode something like: tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies

6. Shell Programming and Scripting

Bash Script for parse input like option and value

I would create a bash script than parse like this: test.sh -p (protocol) -i (address) -d (directory) I need retrive the value after -p for example... understand??? I hope... thanks (6 Replies)
Discussion started by: ionral
6 Replies

7. Shell Programming and Scripting

sh file: READ (menu) but now run with option

I have a script which uses READ to detect choice of menu option...now I want to change the script without doing whole rewrite such that when user runs ./script.sh 5 it would execute menu option 5 rather than user running ./script.sh waiting for it to load and then pressing "5 enter" Is it... (1 Reply)
Discussion started by: holyearth
1 Replies

8. Shell Programming and Scripting

Read: line 6: illegal option -e

For some reason read -e isn't working in my script. I need a directory as input from a user and I'd like for them to be able to use tab complete which is why I'm using -e. When the script is run, I get: read: line 6: illegal option -e In order to just figure out what is going on with the -e... (4 Replies)
Discussion started by: orangeSunshine
4 Replies

9. Shell Programming and Scripting

[Bash] Read History function & Read Arrowkeys

Hi. How can I create a history function? (By "read" command or so) & How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A) Thanks in advance. (4 Replies)
Discussion started by: sinnlosername
4 Replies

10. Shell Programming and Scripting

Menu Driven Bash Shell Script with Default Option

Hi All, I have written a menu driven bash shell script. Current Output is as below: ------------------------------------- Main Menu ------------------------------------- Option 1 Option 2 Option 3 Option 4 Exit ===================================== Enter your... (3 Replies)
Discussion started by: kiran_j
3 Replies
PARSEC47(6)															       PARSEC47(6)

NAME
parsec47 - retromodern hispeed shmup DESCRIPTION
Defeat retro enemies modernly. PARSEC47 is a retromodern hi-speed shoot 'em up where you get to defeat retro enemies modernly. The player must destroy enemies while avoiding their projectiles and collecting green clusters of boxes for points. OPTIONS
These options are available: -brightness n Set the brightness of the screen.(n = 0 - 100, default = 100) -luminous n Set the luminous intensity.(n = 0 - 100, default = 0) -lowres Use the low resolution mode. -nosound Stop the sound. -window Launch the game in a window. -fullscreen Launch the game in fullscreen. -reverse Reverse the shot key and the slow key. -slowship Use the slow speed ship in all game modes. -nowait Disable the intentional slowdown. USAGE
How to play: Movement Arrow/Num key / Joystick Shot [Z][L-Ctrl] / Trigger 1, 4, 5, 8 Slow / Roll, Lock [X][L-Alt][L-Shift] / Trigger 2, 3, 6, 7 Pause [P] Select the stage by a keyboard or a joystick. Press a shot key to start the game. All stages are endless and created randomly each time. The game continues until you lose all ships. Control your ship and destroy enemies. While holding a slow key, the ship becomes slow. You can also select the game mode from 2 types. Press a slow key in the title screen to change the game mode. Each mode has a different barrage pattern. Roll mode: Hold a slow key to charge the roll shot energy. The roll shot is fired when you release the key. Lock mode: While holding a slow key, you can shot the lock-on laser that aims an enemy in the front of your ship. The ship extends 200,000 and every 500,000 points. SEE ALSO
You can find more about the game on its homepage: http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_e.html AUTHOR
This game has been written by Kenta Cho <cs8k-cyu@asahi-net.or.jp> PARSEC47(6)
All times are GMT -4. The time now is 01:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy