Find the answer to your Linux question:
Results 1 to 3 of 3
I need help for th following script!!!!!!!!! 01. shell script to display only process running for myql daemon vi damsql # #shell script for running process for mysql daemon! # ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    1

    Solved, thanks for the confirmation

    I need help for th following script!!!!!!!!!

    01. shell script to display only process running for myql daemon

    vi damsql

    #
    #shell script for running process for mysql daemon!
    #
    clear
    echo RUNNING PROCESS FOR MYSQL DAEMON!!!!!!!!
    ps -ef | grep mysql

    save and exit editor

    chmod 755 damsql

    ./damsql


    02. perl script for disk space report
    # perl script for Disk Space Report
    #
    #!/usr/bin/perl
    clear
    #
    echo DISK SPACE REPORT
    #
    df -h

    save and exit editor
    chmod 755 dskspc

    ./dskspc
    Last edited by pmeet794; 01-26-2011 at 05:55 AM. Reason: solved

  2. #2
    oz
    oz is online now
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,096
    Quote Originally Posted by pmeet794 View Post
    I need help for th following script!!!!!!!!!

    01. shell script to display only process running for myql daemon

    02. perl script for disk space report
    Hello and welcome to the forums!

    It will be much easier for someone to help you and to point out any errors if you'll post your code here.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    5
    You appear to be doing something for school...why else would you need a script that lists the MySQL running processes and the disk space usage in the script itself.

    In any case, start with a SHABANG. It will save loads of trouble in the future to ensure that the script is being run under the proper shell that it was written for.

    Next, you don't need pounds ("#") on your blank lines. A blank line itself is sufficient. Save the pound markers for actual comment lines as it will make them easier to find.

    Finally, it would appear that you figured out your answer since both of those scripts are valid and work. You can expand on them, but I imagine that your class hasn't gotten there just yet. If I am correct that you've figured it out, please modify the posting subject to include "[SOLVED]" so that other users know this thread can be closed.

Posting Permissions

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