shift
Syntax
shift
Description
Shifts the contents of a UEFI Shell script’s positional parameters, enabling scripts to process the parameters from left to right.
Usage
This command shifts the contents of a UEFI Shell script’s parameters so that
%1
is discarded,
%2
is copied to
%1
,
%3
is copied to
%2
,
%4
is copied to
%3
, and so on. This allows UEFI Shell scripts to process script parameters from left to right.
This command does not change the UEFI shell environment variable
lasterror
.
Examples
To execute the script with echo on:
fs0:\> shift.nsh welcome EFI world
shift.nsh> echo welcome EFI world
welcome EFI world
shift
echo EFI world
EFI world
To execute the script with echo off:
fs0:\> echo -off
shift.nsh> shift.nsh welcome EFI world
welcome EFI world
EFI world