Common Scripting errors for beginners

when i  started scripting i had these errors in the begenning . The most common mistakes one makes during his initial stages of scripting are.

1.Check script file permissions. A script needs execute permission

2.We should not use default values that generate errors.If you
  give those your script execution breaks in the middle.

3.We must supply parameters as required ie make parameter mandatory
  if parameter is to be provided for sure, or else it throws an error.

4. Resuable script should not be hard-coded values.Use parameters  instead.

5.Commenting the script is very important... Make it a habbit to write
  comments.Also specify in comments if script has multiple parameters.
  you can also write examples in comments for better understanding.

6. Error handling is a must for scripting

No comments: