Originally posted by: tony.evans
Here's how I learned to write scripts for Unix systems.
1. what steps would I follow to do this manually
2. write them down
3. work out the logic to put around them to automate them
So, if you want to check filesystems, how would you do it yourself from the command line?
Once you understand that, you can begin to develop your own scripts.
Some people might suggest that it's better to simply share the scripts everyone else writes, but I think that only works when you know how to write your own anyway. If you just use everyone elses scripts, and they don't work, you can't fix them.
If you learn to do it yourself and then use other people's scripts, you can fix them.
So, my advice is learn how to write scripts by following the above steps.
Do it yourself manually on a box, work out what steps you took, and then put some control around that. It might be ugly and it might not be efficient but it'll be more valuable to you and your continued learning than copying and pasting something else.
#AIX-Forum