DEV Community


Posted on


Bash Script Menu Install Apps

In this script you will be able to visualize how to generate a menu in BASH to install applications for example.

for more info -


function app_chrome() {
    cd /home/
    sudo wget
    sudo wget
    sudo dpkg -i google-chrome-stable_current_amd64.deb
    sudo apt-get install -f
    sudo rm -f google-chrome*.deb
    sudo rm -f *
    echo -e "\e[44m_____End Chrome_____\e[0m"

function app_slack() {
    cd /home/
    sudo wget
    sudo dpkg -i slack-desktop-*.deb
    sudo rm -f slack*.deb
    echo -e "\e[44m_____End Slack_____\e[0m"

function app_zoom() {
    cd /home/
    sudo wget
    sudo dpkg -i zoom*.deb
    sudo rm -f zoom*.deb
    echo -e "\e[44m_____End Zoom_____\e[0m"

function app_git() {
    sudo add-apt-repository -y ppa:git-core/ppa 
    sudo apt update; sudo apt install -y git
    echo -e "\e[44m_____End Git_____\e[0m"

function update_system() {
    sudo apt update -y  && sudo apt upgrade -y && sudo apt autoremove -y

function all() {
    echo -e "\e[44m_____End ALL\e[0m"

echo -ne "
2) Install Zoom 
3) Update_system
4) Install Chrome
5) Install Slack
6) Install Git

1) --ALL--
0) Exit

Choose an option:"
        read a
        case $a in
            1) all ; menu ;;               
            2) app_zoom ; menu ;;
            3) update_system ; menu ;;
            4) app_chrome ; menu ;;            
            5) app_slack ; menu ;;
            6) app_git ; menu ;;

        0) exit 0 ;;
        *) echo -e $red"Wrong option."$clear; WrongCommand;;

# Call the menu function

Enter fullscreen mode Exit fullscreen mode

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.