搜尋此網誌

2011年10月23日 星期日

EFI Shell commands -- SHIFT(位移批次檔輸入參數位置)

Shifts batch file input parameter positions.

SHIFT

Note:

    1. The SHIFT command is only available in batch script files.
    2. Each time the SHIFT command is executed the parameters are shifted one
       position higher, giving you access to more than ten parameters.

Examples:

  * To execute a batch file named MySript.nsh:
    fs0:\> MyScript.nsh X1 X2 X3 X4 X5 X6 X7 X8 X9 X10

    The parameters available when MyScript.nsh initially begins execution will
    be set as follows:
    %1 = X1
    %2 = X2
    %3 = X3
    %4 = X4
    %5 = X5
    %6 = X6
    %7 = X7
    %8 = X8
    %9 = X9

  * To shift the parameters one position inside the batch file:
    shift

    The parameters available in MyScript.nsh are changed as follows:
    %1 = X2
    %2 = X3
    %3 = X4
    %4 = X5
    %5 = X6
    %6 = X7
    %7 = X8
    %8 = X9
    %9 = X10

沒有留言:

張貼留言