Answer the question
In order to leave comments, you need to log in
What to use to create a console menu using the terminal?
Tell me what can be used in Linux to build a menu in the console? I want to make a program for processing simple requests, such as pinging a dedicated server and performing operations with files, as well as little things ((all operations available in the terminal out of the box without using third-party software, that is, using the system tools) in this particular case, I have a fork of Archa Manjaro , but I can also develop under ubuntu, it doesn’t matter) As an example, a console menu of this kind:
---------------------------
Programm title
-- -------------------------
1. Ping ya.ru
2. Folder programm - file operations
3. Attack korovans
__________________________
->
Google does not give any answer that would suit me, maybe I can’t briefly express my Wishlist ... At least kick in the right direction. Thnks!
Answer the question
In order to leave comments, you need to log in
If you want programmable behavior, look at ncurses - there are all sorts of bindings for it in different languages like Python.
Actually the code that I added
#menu visual
function menu {
clear
echo -e "\t\t "
D=$(date +%Y-%m-%d/%A)
T=$(date +%H:%M )
echo -e "\tDate/Time $D" "$T"
echo -e ""
echo -e "\t\e[4mTerminal Command Menu\e[0m\n"
echo -e "\t\t "
sleep 0.1
echo -e "\t1. Configuration"
sleep 0.1
echo -e "\t2. Arch command terminal"
sleep 0.1
echo -e "\t3. Data storage - to exit q (File manager - exit q)"
sleep 0.1
echo -e "\t4.Features (Tools)"
sleep 0.1
read -n 1 option
}
#menu software
while [ $? -ne 1 ]
do
menu
case $option in
0)
breakfunc
;;
one)
load
clear
./hardware.conf.sh ;;
2)
echo " This is the command line of the ARCH terminal emulator, in case you
know the commands you can try typing them here. For help, type help"
echo -en "\n\n\t\t\t Please press any key to continue "
sleep
clear
$info1
read -p 'Enter command ->' info1
$info1 ;;
3)
data storage ;;
4)
echo ;;
5)
viewpon ;;
6)
menu2 ;;
7)
test ;;
a)
;;
*)
clear
echo "Invalid input, please try again";;
esac
echo -en "\n\n\t\t\t Please press any key to continue"
read -n 1 line
done
clear
add functions to your taste)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question