Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
417 views
in Technique[技术] by (71.8m points)

shell - How to select option when click "Enter" button?

I have this code, im clicking "7" button to Skip, i want change it to Enter button.

Codes:

echo "Test code"
echo -e "(corona) > Press 7 to skip... c"
read option

#Choose
case $option in 
7)
payload='windows/meterpreter/reverse_tcp'
read int 
;;
*)
echo -e 'e[0;31m【!】 Invalid option, write a valid number, between 1 & 7. e[0m'
exit
;;
esac

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
read -r -s -p $'Press enter to continue...'

To know more click here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...