Results 1 to 4 of 4

Thread: Scripting

  1. #1
    Join Date
    Feb 2013
    Beans
    4

    Scripting

    Could somebody kind of walk me through the following? What areas would one study to get a handle on what the below requirements are?

    This is for disk usage.

    I have had one course in Linux/Unix. I have had C programming.
    Is Bash ok to use?





    Create a script that sends an email message to the user specified on the command line if any of the filesystems are at more than 70% of capacity. The script should not process special filesystems as /proc . It should only process filesystems which are either locally mounted or are mounted via NFS.
    An individual email should be sent for each filesystem which is at the warning level. There should be a subject on the email with a message "Warning: Filesystem <put filesystem the>here is at <X>% of capacity" If the filesystem is at greater than 90% of capacity, the "Warning" should be changed to "Critical Warning".

  2. #2
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Scripting

    More than OK!

    http://tldp.org/LDP/abs/html/ <--- lots of good stuff to start with here.
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  3. #3
    Join Date
    Feb 2010
    Location
    WI USA
    Beans
    10,442
    Distro
    Ubuntu Development Release

    Re: Scripting

    The following is informative also.
    Code:
    man bash
    Infinite diversity in infinite combination.

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Manual

  4. #4
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: Scripting

    Besides bash, you probably should read up at least about df(1), mount(8), and mailx(1).
    Last edited by schragge; February 15th, 2013 at 12:18 AM. Reason: Link fix

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •