how to make script
hi..
in fact i am new in Linux OS so i want make script for daily check using this command, (df -k,top ,ps -ef|grep tomact) so guys i need your support in this task ... Thank Q |
in general a script is a list of commands (executed one by one). So if you have a group of commands just put them in a file and the script is ready to run.
Otherwise please give us more details... |
Here is a good resource:http://www.tldp.org/guides.html and look for the Advanced Bash-Scripting Guide
|
See also http://rute.2038bug.com/index.html.gz
We like to help people, rather than do it for them. Use the links you've been given to have a go, then come back if you get stuck. Don't forget to post your code if you do come back |
If you're complete newbie in scripting, then follow guides suggested in above posts #3 and #4.
On the other hand, if you have little bit knowledge of scripting, then begin as: Code:
#!/bin/bash |
Please post a script that you've started with any questions that have arisen, if any. You may find that the script works once you try it.
Recommendations are that you enable some bash debugging options to assist you in your debugging. http://tldp.org/LDP/Bash-Beginners-G...ect_02_03.html Reading that whole guide will be helpful. Another tip is to pay attention to special bash variables and consider functions for complicated scripts. |
Study and exercises ;)
A good thing is try to resolve a same problem with different way. Anyway as already said, tldp is a good resource: http://www.tldp.org/guides.html |
All times are GMT -5. The time now is 09:02 AM. |