Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

NSHScript - addNSHScriptParameterByGroupAndName_1

NSHScript - addNSHScriptParameterByGroupAndName

Description :

This command adds a parameter with a command argument and a value in the default value field to an NSH script. For a similar command that adds a parameter with a value in the default value field, see addNSHScriptParameterByGroupAndName .

You must provide the name of the script and the fully qualified path to the depot group containing the script (for example, /NSHScripts/Utility).

The paramValueFlag argument is used to set characteristics for the parameter. The possible characteristics each have a value, as follows:

  • 1 = parameter accepts value
  • 2 = value must not be empty at run time
  • 4 = value is editable
  • 8 = parameter flag required at runtime

For paramValueFlag, add the values representing the properties you want to assign to the parameter. For example, a value of 5 sets the parameter to accept a value and be editable.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

scriptGroup

String

Full path to the depot group containing the NSH script.

scriptName

String

Display name of the NSH script.

paramName

String

Name of the parameter being added.

paramDesc

String

Description of the added parameter.

commandArg

String

Command argument to be added.

paramValue

String

Value for the command argument.

paramValueFlag

Integer

Number describing the characteristics of the parameter. See above for a more complete description.

Example

The following example shows how to add a parameter to an existing NSH script. The parameter takes no arguments.

Script


NSHSCRIPT_GROUP=/nshscripts 

NSHSCRIPT=reboot 

PAR_NAME=delaytime 

PAR_DESC="The time in seconds before reboot" 

PAR_VALUE="" 

PAR_FLAG=0 

COMMAND_ARG=f 

RESULT=`blcli NSHScript clearNSHScriptParametersByGroupAndName $NSHSCRIPT_GROUP $NSHSCRIPT` 

RESULT=`blcli NSHScript addNSHScriptParameterByGroupAndName $NSHSCRIPT_GROUP $NSHSCRIPT $PAR_NAME "$PAR_DESC" $COMMAND_ARG "$PAR_VALUE" $PAR_FLAG` 



Was this page helpful? Yes No Submitting... Thank you

Comments