Creating Command Line Menus with Shell Scripts

  Рет қаралды 82,892

theurbanpenguin

theurbanpenguin

Күн бұрын

Пікірлер: 36
@jonchellis2978
@jonchellis2978 3 жыл бұрын
Still useful in 2021. Used this to build out a menu to give controlled and simplified access to a new appliance of ours. Thanks!
@byteman
@byteman 10 жыл бұрын
Nice, thanks! Been looking for something like this for a long time. Not being proficient in bash scripting, I appreciate the head-start. One suggestion if your menu is going to use 1 character input (number or letter), perhaps change the "read answer" command to: read -n1 -p "Your Choice:" answer (no [Return] required)
@earnestredwood4694
@earnestredwood4694 4 жыл бұрын
This is great thank you for all that you teach up with Linux. I am still learning and it never ends.
@theurbanpenguin
@theurbanpenguin 4 жыл бұрын
Thanks you sir! You are very kinf to make a comment and I appreciate it Earnest
@jentr5685
@jentr5685 3 жыл бұрын
If I want the users to enter both Uppercase and Lowercase alphabet for the menu selection, what should I put before the ) to instead? Thx.
@meiowalot7570
@meiowalot7570 5 жыл бұрын
At 6:10 or so, 4,18> is a simpler, more direct way to indent code. It seems like overkill to use a regex and s/// to indent contiguous lines of code, so a pattern match and replace just isn't needed. Also, I think if you want a couple lines between the choices and the prompt, a couple of echo statements all by themselves is more straightforward than the echo -e " ", e.g.: echo echo I would also use read statements in place of the two prompts using the echo -n (text) because I think it is more readable and easy to understand expressed as: read -p "Enter your selection " answer ... read -p "Enter return to continue" input
@DDBAA24
@DDBAA24 5 жыл бұрын
This Bob here , he's been sharing his password with me , lol
@plasticinthetree4261
@plasticinthetree4261 4 жыл бұрын
Nice! The "Enter return to continue" works great for commands like "who" that need to print to the screen, but my menu also launches graphical apps like firefox, audacious, etc, and it sucks to have to hit return after closing them in order to continue. How can I structure my script so that I see the output for commands like who and cal, but does NOT call for entering return when launching gui apps? Thanks
@pepe-perez
@pepe-perez 4 жыл бұрын
read -n1 answer
@adriansrealm
@adriansrealm 11 жыл бұрын
It really should have a default condition in the event the user enters something other than the three things the menu has handlers for.
@vincentpham7445
@vincentpham7445 7 жыл бұрын
I really fond of the vi substitution vi tricks that you perform, can you make a video that explain the trick? It's will be helpfull for anyone when they work on shell programming environment.
@derSchmidi
@derSchmidi 8 жыл бұрын
Excellent guide! That was soo helpful like so many of your videos. Great job!
@Trevs-Shed
@Trevs-Shed 11 жыл бұрын
Can the commands that you put in the menu only be commands that the particular user would usually have permission to carry out.? Or could I, for instance set a menu option that only myself as root would usually be able carry out.
@10thDoctorLove
@10thDoctorLove 8 жыл бұрын
This is absolutly fantastic. Thank you so much for doing it :)
@AwesomeBob
@AwesomeBob 11 жыл бұрын
Love the videos, but can you do some volume leveling going forward? It's always brutal during the intro then quieter during the content portion of the video.
@j99mac
@j99mac 4 жыл бұрын
dose the trap and control c work on osx Mac?
@mx22a
@mx22a 10 жыл бұрын
Thank you very much! Follow your video I build a little script to use a list of online FM stations using mplayer for it. I just add a line with a timer sleep on the script. Nice!
@DBINB-sw3ow
@DBINB-sw3ow 5 жыл бұрын
love you brother >> you solve my big problem love you again
@Asimov16
@Asimov16 7 жыл бұрын
Would there be any point, pointing out your mistakes in a video, as you are not really going to hear us LOL. PS what editor are you using. I tried this in nano, but some things don't work
@turk0lu373
@turk0lu373 7 жыл бұрын
seems to be using vi. comes with every distro, has a lot of options. check it out
@Asimov16
@Asimov16 7 жыл бұрын
Thanks. I got it to work in nano in the end, once I understood what was going on
@kencheng2929
@kencheng2929 4 жыл бұрын
Awesome stuff
@sinistergeek
@sinistergeek 6 жыл бұрын
very helpful video!!
@karakurt7876
@karakurt7876 4 жыл бұрын
Whoah, sound is hurting.... Otherwise great one, thanks! I wasted a lot of time searching this topic
@karakurt7876
@karakurt7876 4 жыл бұрын
Nope, wrong again... I'd love to see same thing, but with arrow keys navigation
@BrutusPalmeira
@BrutusPalmeira 5 жыл бұрын
That penguin from the hood...
@gregorychamekh8143
@gregorychamekh8143 4 жыл бұрын
fantastic!
@jimbo8743
@jimbo8743 4 жыл бұрын
Good stuff
@MagicalCritical
@MagicalCritical 2 жыл бұрын
15>>
@EtwBiz
@EtwBiz 3 жыл бұрын
You da bomb 💣
@jamescobb2618
@jamescobb2618 5 жыл бұрын
Pengdeliciousness...
@theurbanpenguin
@theurbanpenguin 5 жыл бұрын
:) Thanks
@sciencelover3558
@sciencelover3558 5 жыл бұрын
Please don’t use white it hurts my eyes 👀
Using BASH Script Arguments
9:00
theurbanpenguin
Рет қаралды 39 М.
Add Dialogs And Menus To Shell Scripts With Whiptail
23:09
DistroTube
Рет қаралды 21 М.
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 5 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 53 МЛН
A Beginner's Introduction to BASH Shell Scripting
44:24
Joe Collins (EzeeLinux)
Рет қаралды 291 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 1 МЛН
Transform Your Scripts With Bash Simple Curses
16:15
DistroTube
Рет қаралды 111 М.
Shell Scripting Crash Course - Beginner Level
32:19
Traversy Media
Рет қаралды 748 М.
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
Null Byte
Рет қаралды 774 М.
BASH Scripting in Linux Lesson 1 - create, execute and debug scripts
11:19
7 Essential Command Line Tools (2022)
9:12
Tech Craft
Рет қаралды 222 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,2 МЛН
А я думаю что за звук такой знакомый? 😂😂😂
00:15
Денис Кукояка
Рет қаралды 5 МЛН