Setsize, Shift, Setsize shift – HP Unified Extensible Firmware Interface User Manual
Page 50
![background image](/manuals/398358/50/background.png)
Shell> set
* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
To set a volatile variable that disappears at the next boot:
Shell> set -v EFI_SOURCE c:\project\EFI1.1
Shell> set
* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
* EFI_SOURCE : c:\project\EFI1.1
setsize
Adjusts the size of a file.
Syntax
setsize size
[-d] file [file...]
Options
size
The size of the file once it is adjusted.
-d
Deletes a variable.
file
The file that is adjusted in size.
Description
This command adjusts the size of a target file. When adjusting the size of a file, it automatically
truncates or extends the size of the file based on the passed in parameters. If the file does not exist,
it is created. Setting the size smaller than the actual data contained in the file truncates the data.
Example
To set the size of a file:
fs0:\> setsize size file [file...]
shift
Shifts the contents of a UEFI Shell script’s positional parameters, allowing scripts to process them
from left to right.
Syntax
shift
Description
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.
NOTE:
This command does not change the UEFI shell environment variable lasterror.
Example
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:
50
UEFI Shell command reference