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

RequireArgs

Page 51 highlights

Controller[A] :: push ^iscsi.targets[$first] Changes the context to the first iSCSI target, even though the current context is Controller[A]. Help Push Displays help for the Push command. 4.2.10 RequireArgs The requireArgs command is an advanced feature intended for use with script files. This command lets you specify the required number of arguments for subsequent commands. If a CLI script has this command and the number of arguments provided does not provide at least the number of required arguments specified with RequireArgs, the script is terminated. Syntax requireArgs [optionalDisplayStringOnError] where is the required number of arguments for subsequent commands and [optionalDisplayStringOnError] is a string that is displayed to the user if the argument count is not satisfied. Examples requireArgs 8 Checks that at least 8 arguments are present for the current script, and terminates the script if not. Help requireArgs Displays help for the RequireArgs command. Command Line Interface User's Guide 41

  • 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

Command Line Interface User’s Guide
41
°
Controller[A] :: push ^iscsi.targets[$first]
Changes the context to the first iSCSI target, even though the current context is
Controller[A].
°
Help Push
Displays help for the
Push
command.
4.2.10
RequireArgs
The
requireArgs
command is an advanced feature intended for use with script files. This
command lets you specify the required number of arguments for subsequent commands.
If a CLI script has this command and the number of arguments provided does not provide at
least the number of required arguments specified with
RequireArgs
, the script is
terminated.
Syntax
requireArgs <integer> [optionalDisplayStringOnError]
where
<integer>
is
the required number of arguments for subsequent commands and
[optionalDisplayStringOnError]
is a string that is displayed to the user if the
argument count is not satisfied.
Examples
°
requireArgs 8
Checks that at least 8 arguments are present for the current script, and terminates the
script if not.
°
Help requireArgs
Displays help for the
RequireArgs
command.