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!
#
...
- 01-25-2011 #1Just 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
./dskspcLast edited by pmeet794; 01-26-2011 at 05:55 AM. Reason: solved
- 01-25-2011 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,096
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.
- 01-26-2011 #3Just 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.


Reply With Quote
