D-Link DSN-540 CLI User's Guide for DSN-1100-10 - Page 46

Execute

Page 46 highlights

4.2.2 Echo Use the Echo command to echo command lines to Standard Out (STDOUT). When enabled, a copy of each command line you issue is sent to STDOUT. By default, echo is disabled. Issuing this command enables echo. Issuing the command again disables echo. Because Echo writes to STDOUT, it can be redirected. Syntax Echo Examples Echo Enables echo to STDOUT (if echo was disabled) or disables echo to STDOUT (if echo was enabled). Help Echo Displays help for the Echo command. 4.2.3 Execute Use the Execute command to execute a text file containing one or more CLI command lines. Adding command lines to a file is particularly convenient if you will be performing repetitive operations on several systems: just enter the commands into a text file and then execute the text file each time you want to perform those operations. The text file extension must be .cli. The CLI ignores blank lines or lines beginning with two forward slashes (//) in a script file. Therefore, you can add comment (remark) lines to a script file and not have the CLI execute them by starting the lines with //. Syntax Execute Examples Execute createVols Executes a file called CreateVols.cli that contains the following two CreateVolume commands to be performed: Do createVolume CAD 30000000 mirror Do createVolume Exchange 125829120 parity [0,1,2,3] 4 512kb In the command line example above, the .cli extension in the file name is assumed and should be omitted from the command line. Help Execute Displays help for the Execute command. 36 Chapter 4 Global Action Commands

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97

36
Chapter 4
Global Action Commands
4.2.2
Echo
Use the
Echo
command to echo command lines to Standard Out (STDOUT). When enabled, a
copy of each command line you issue is sent to STDOUT. By default, echo is disabled. Issuing
this command enables echo. Issuing the command again disables echo.
Because
Echo
writes to STDOUT, it can be redirected.
Syntax
Echo
Examples
°
Echo
Enables echo to STDOUT (if echo was disabled) or disables echo to STDOUT (if echo was
enabled).
°
Help Echo
Displays help for the
Echo
command.
4.2.3
Execute
Use the
Execute
command to execute a text file containing one or more CLI command
lines. Adding command lines to a file is particularly convenient if you will be performing
repetitive operations on several systems: just enter the commands into a text file and then
execute the text file each time you want to perform those operations. The text file
extension must be
.cli
.
The CLI ignores blank lines or lines beginning with two forward slashes (
//
) in
a script file. Therefore, you can add comment (remark) lines to a script file
and not have the CLI execute them by starting the lines with
//
.
Syntax
Execute <pathname>
Examples
°
Execute createVols
Executes a file called
CreateVols.cli
that contains the following two
CreateVolume
commands to be performed:
Do createVolume CAD 30000000 mirror
Do createVolume Exchange 125829120 parity [0,1,2,3] 4 512kb
In the command line example above, the .
cli
extension in the file name is assumed and
should be omitted from the command line.
°
Help Execute
Displays help for the
Execute
command.