5 Shell Scripts for Linux Newbies to Learn Shell Programming – Part II

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

85 Responses

  1. qazi abid says:


    Actually I tried file encrypt script but when I execute the code it gives me error. Can you please send me how to do it will really appreciate your help.

    Thank you

    • Ravi Saive says:


      What error you getting while executing the script code? could you share with me here, so that we can help you out..

  2. Petterock says:

    You can try this.

    #Creador Alfredo Pettengill – Rollout-IT

    df=”$(df -hP | egrep ‘^/dev/’ | awk ‘{ print $6 “_:_” $5 }’ )”
    CPU=”$(top -bn1 | grep load)”
    free=”$(free -mt | grep Mem: )”
    if [[ “$df” > “$THRESHOLD” ]]

    mail -s ‘Disk Alert ‘$hostname’ ‘ [email protected] << EOF
    Server Disk Space $hostname. Usado:


    —Server RAM Memory—

    Total Used Free Shared Buffer Cache

    —Server CPU usage—


    —Loggin Users—


  3. Francesco says:

    Hi, good article. Perhaps when you are searching for OOM messages it is better to search the string “Out of memory” as with “kill” you would find more output then required.

  4. Dede says:

    A friend show me a website named UsiScript (http://www.usiscript.com). It’s a tool that help you to create a bash script, even you don’t know the syntax. It’s simple and fast.

  5. mandeep says:

    You all guys are the best….
    One request to all of you pls explain every field in script for more understanding to the readers.
    Thank you all.

Got something to say? Join the discussion.

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