DAY 5

Installing application in Linux using bash script – Automation

Today script, we are going to learn to install any application in Linux by using the bash script, it will help reduce the ⏰ time-consuming task of installing applications manually. let’s see the script.

    Result

    #!/bin/bash
    echo "-----------DAY 5------------"
    day=$(date)
    greet="Welcome to BuildingTHEITGUY"
    echo "$day"
    echo "$greet"
    echo "Topic - Installing Apps from Script"
    echo '###Checking Update..'
    apt-get update  # To get the latest package lists
    echo '###Installing Toilet..'
    apt-get install toilet -y
    echo "---------xxxxxx--------------"
    
    Installing applications from bash script

    DAY 4

    In this script, we call about the system full IP information IPv4 and IPv6 also called in Linux inet for IPV4 and inet6 IPV6, once we call this information we can filter this by grep command like match certain keyword in this output.

    #!/bin/bash
    echo "-----------DAY 1------------"
    day=$(date)
    ip=$(ip a | grep inet)
    greet="Welcome to BuildingTHEITGUY"
    echo "$day"
    echo "$greet"
    echo "Topic - Getting INFO"
    echo "---------xxxxxx--------------"
    echo "$ip"
    echo "--------STAY TUNE------------"
    
    DAY 4

    DAY 3

    #!/bin/bash
    echo "-------------DAY 3---------------"
    day=$(date)
    linver=$(lsb_release -a | grep Release)
    size=$(free -h)
    echo "CURRENT VERSION $linver"
    echo "SERVER INFO $size"
    echo "--------STAY TUNE------------"
    
    
    DAY 3

    DAY 2

    If you learn or see the bash script first time, you can notice the first line of the script starts with #! Its called SHEBANG #!

    which used tell the Linux OS, which interpreter to use to parse the rest of the file.

    Today Hint – We will find the version as output using $(command)

    #!/bin/bash
    echo "-----------DAY 2-------------"
    day=$(date)
    linver=$(lsb_release -a)
    echo "DAY 2 $day"
    echo "Topic - Version"
    echo "My Bash Version is $BASH_VERSION"
    echo "My linux Version is $linver"
    echo  "---------STAY TUNE----------"
    
    bash script
    DAY 2

    DAY 1

    Bash or Shell, whatever we call it can do magic, it can be a text file containing a series of commands and just give the output, what you want.

    Today Hint – Echo in bash used to throw the output.

    #!/bin/bash
    echo "------------DAY 1--------------"
    day=$(date)
    greet="Welcome to BuildingTHEITGUY"
    echo "$day"
    echo "Topic - ECHO"
    echo "$greet"
    echo "---------STAY TUNE-------------"
    
    DAY 1

    By Mohamed Asath

    Here is my message HOW CAN I HELP YOU ? To develop your IT career.

    Leave a Reply

    Your email address will not be published. Required fields are marked *