Unsolved
This post is more than 5 years old
1 Rookie
•
100 Posts
0
1032
August 5th, 2009 04:00
i want to learn & write scripts, please help me.
Which are the books or URLS to refer to get knowledge to write all types of scripts in legato NetWorker at any platform?
Windows or Unix
Thanks in advance
Windows or Unix
Thanks in advance
No Events found!



benzino1
2 Intern
•
244 Posts
0
August 5th, 2009 05:00
DavidHampson
2 Intern
•
1.1K Posts
0
August 5th, 2009 06:00
DavidHampson
2 Intern
•
1.1K Posts
0
August 5th, 2009 06:00
I haven't scripted in Windows for well over 10 years and it does not lend itself well to scripting in my opinion so stick to UNIX if you can. I'd suggest picking a favourite shell to script in as commands will differ slightly, but be aware of the differences as you may well have to fix a script written in another shell. Its also reasonably common to see PERL used for scripting too, especially for reports.
Some useful sites worth looking at:
http://www.sun.com/bigadmin/shellme/
http://tldp.org/LDP/abs/html/index.html
http://www.well.ox.ac.uk/~johnb/comp/unix/ksh.html
If someone has written scripts in your office previously take a look at what they have done using these guides as reference to give you an idea as to how it works. If it doesn't do quite what it should identify the problem and attempt to fix it.
Some advice I'd give on beginning scripting:
* annotate your script, explain what you are doing (a # character indicates all that follows is a comment) - if you don't do this the next person to look at this will have no idea what is going on (which may be you in a month's time).
* include logging what is going on in the script, if it is not working correctly or has errors you will be able to locate the problem far easier. In particular log what parameters you are passing to commands or what you are using in tests.
* hash out anything destructive until you have confirmed it is operating on the data you want in the way you want.
* depersonalize your script as much as possible; assign any variables which may vary in different situations by passing parameters or in a section at the top of the script
* save your scripts - you can always reuse them, or sections of them if you move to a different job. It saves you having to make it all up again and makes you look clever in the eyes of your boss right away. The downside is he is more likely to forgotten it a year later when you have your annual review!