Linked Questions
17 questions linked to/from How can I create a select menu in a shell script?
0
votes
1
answer
5k
views
Select (loop) or command not working in shell-script [duplicate]
I've been tinkering with Linux and Unix for years but still a novice in my mind and recently find myself trying to be more pro with it as I work in IT. So with that notion I'm studying shell scripting....
1
vote
2
answers
4k
views
run programs from select menu [duplicate]
I've created a simple bash script to create a select menu which look like this :
1) Run nmap
2) Wireshark
3) metasploit framework
4) Exit
now I want to run these programs as per menu selection. I am ...
9
votes
3
answers
31k
views
Create bash menu based on file list (map files to numbers)
This answer shows great and intuitive bash menu where you just press number and item is selected. But it's kinda inconvenient for file list, because it's all hardcoded. I'd rather fill my files in ...
0
votes
4
answers
5k
views
bash script which checks input to see if it is "y", "n" or other - not working
I have written this bash script which is meant to check your input to see if it is y, n or something else (this will be part of a larger project):
#!/bin/bash
echo "Have you updated the PATH ...
7
votes
2
answers
1k
views
Why doesn't this loop the menu?
I'm using GNU bash, version 4.3.46 on a Ubuntu machine. For some reason this while loop doesn't work as expected.
The menu should loop continuously until the user decides to quit the program, then ...
2
votes
1
answer
8k
views
Create bash script that allows you to choose multiple options instead of just one?
I'm thinking about creating a bash script where multiple options can be specified and at the end define the variables according to the chosen options or execute certain orders when receiving the ...
3
votes
2
answers
5k
views
Bash interactive script
Is it possible to provide more than one variable to be executed in first prompt?
at first prompt I would like to provide 1 or 2 up to 5 variables which are executing particular script within one ...
1
vote
2
answers
5k
views
Proper method for storing user input in bash scripts
I would like to make a chat bot using bash.
And I was just wondering if anyone in the community knows of a proper / preferred method for storing user input as a variable in a shell script.
For ...
0
votes
3
answers
2k
views
How to get ls in "select * in *?
I want to program a script, which helps me installing thinks. ( I program it for bash exercises) I want to have a menu with "select option in options"
#!/bin/bash
download="~/Downloads/"
options='ls -...
1
vote
1
answer
2k
views
Make grub boot entry to load recovery menu
Make grub boot entry to load recovery menu
Using Lubuntu 22.04 LTS
I'm trying to add a grub entry that would be able to load a menu.
This menu should have 4 options:
Backup sda
dd if=/dev/nvme0n1 of=/...
1
vote
1
answer
896
views
how to create bash menu for listed folders
I have created a simple bash script in ubuntu to backup my projects:
#!/bin/bash
save_backup_path=~/Downloads/my_backup
web_projects_path=~/Downloads/my_backup/projects
cd $web_projects_path || ...
0
votes
3
answers
170
views
While $value != [a..b]
I'm trying to write a function that rewrites a value according to a user's choice. So far it looks like this:
while [[ $code_id != [1-28] ]]; do
echo "Please select a value..."
echo "1. ...
1
vote
1
answer
472
views
How can I use terminal commands to access Ubuntu menu items?
I need to run a bash script that will retrieve all of the desktop files located in a specific menu item (like accessories/utilities or education, etc) and then run a specific one of them. What ...
0
votes
1
answer
171
views
Need help with beginner bash script
Im writing a script that prompts the user to pick one of three choices, depending on the choice the prompt should echo back a line.
"!/bin/bash
first=chocolate
second=vanilla
third=strawberry
...
1
vote
1
answer
212
views
How to automate commands I use very often on VPS?
I have some projects on DigitalOcean VPSs. I deploy parts of code very often. Almost after every upload I have to do multiple commands.
For example if I change Django models and add some static files:...