Specifications

Version 2.0
173
parse
Summary
Command used to retrieve a value from a particular record which was output in a
standard formatted output.
Usage
parse filename tablename column [-i <Instance>] [-s <Instance>]
Options
filename
Source file name
tablename
The name of the table being parsed.
column
The one-based column index to use to determine which value from a particular
record to parse.
-i <Instance>
Start parsing with the nth instance of specified tablename, after the specified
instance of ShellCommand. If not present, then all instances will be returned.
-s <Instance>
Start parsing with the nth instance of the ShellCommand table. If not present,
then 1 is assumed.
Description
This command will enable the parsing of data from a file which contains data which
has been output from a command having used the –sfo parameter. Since the
standard formatted output has a well known means of parsing, this command is
intended to be used as a simplified means of having scripts consume such constructed
output files and use this retrieved data in logic of the scripts being written for the
UEFI shell.
Examples
The following data is contained in a temporary file (temp.txt):
VolumeInfo, "MikesVolume","400000000","32000000","16000000"
FileInfo, "fs0:/efi/boot/winloader.efi","45670","arsh"
FileInfo, "fs0:/efi/boot/mikesfile.txt","1250","a"
FileInfo, "fs0:/efi/boot/readme.txt","795","a"
The following shows the parse command being used: