Specifications

Version 2.0
193
shift
Usage
shift
Description
The shift command shifts the contents of a UEFI Shell script’s positional 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.
Note: This command does not change the UEFI shell environment variable
lasterror.
Note: The shift command is available only in UEFI Shell scripts.
Examples
Following script is a sample of 'shift' command:
fs0:\> type shift.nsh
#
# Example script for 'shift' command
#
echo %1 %2 %3
shift
echo %1 %2
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
fs0:\> shift.nsh welcome EFI world
welcome EFI world
EFI world