Specifications
Scripts in SnapCLI
Appendix B Command Line Interface 177
Scripts in SnapCLI
Administrative tasks can be automated with shell scripts that call SnapCLI
commands.
Running a SnapCLI Script
1 Create the script and put it in a share on the local server.
Notes
• Be sure to use an application that is compatible with the standard UNIX text
file format (e.g., vi). Avoid using Windows clients to create or edit scripts.
• Place the script in a share that will never be part of a delete script.
2 Log in to the SnapCLI (see Logging into SnapCLI for instructions).
3 Type osshell to get a bash prompt.
4 At the prompt, make sure the script is executable by typing the following and
pressing
Enter:
chmod +x/shares/[sharename]/[scriptname]
where sharename is the name of the share where you put the script and scriptname
is the name of the script.
5 To run the script, type the path again, and press Enter:
/shares/[sharename]/[scriptname]