JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle® ZFS Storage Appliance Administration Guide
Oracle Technology Network
Print View
search filter icon
search icon

Document Information

Using This Documentation

Chapter 1 Oracle ZFS Storage Appliance Overview

Chapter 2 Status

Chapter 3 Initial Configuration

Chapter 4 Network Configuration

Chapter 5 Storage Configuration

Chapter 6 Storage Area Network Configuration

Chapter 7 User Configuration

Chapter 8 Setting ZFSSA Preferences

Chapter 9 Alert Configuration

Chapter 10 Cluster Configuration

Chapter 11 ZFSSA Services

Chapter 12 Shares, Projects, and Schema

Chapter 13 Replication

Chapter 14 Shadow Migration

Chapter 15 CLI Scripting

Automating Access

Batching Commands

Scripting Commands

The Script Environment

Interacting with the System

The Run Function

The Get Function

The List Function

The Children Function

The Choices Function

Generating Output

Dealing with Errors

Chapter 16 Maintenance Workflows

Chapter 17 Integration


The Script Environment

In the CLI, enter the script environment using the script command:

dory:> script
("." to run)> 

As the script environment prompt, you can input your script, finally entering "." alone on a line to execute it:

dory:> script
("." to run)> for (i = 10; i > 0; i--)
("." to run)>    printf("%d... ", i);
("." to run)> printf("Blastoff!\n");
("." to run)> .
10... 9... 8... 7... 6... 5... 4... 3... 2... 1... Blastoff!

If your script is a single line, you can simply provide it as an argument to the script command, making for an easy way to explore scripting:

dory:> script print("It is now " + new Date())
It is now Tue Oct 14 2009 05:33:01 GMT+0000 (UTC)