parse

Syntax

parse filename tablename column[-i instance][-s instance]

Description

Retrieves a value from a specified record that was output in standard formatted output.

Options

filename

Specifies a source file name.

tablename

Specifies a table name to be parsed.

column

Specifies a one-based column index for determining which value from a particular record to parse.

-i instance

Starts parsing with the nth instance of the specified tablename , after the specified instance of ShellCommand. If not present, all instances are returned.

-s instance

Starts parsing with the nth instance of the specified ShellCommand table. If not present, 1 is assumed.

Usage

This command enables the parsing of data from a file containing data output from a command that used the –sfo parameter. Because 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 the logic of the scripts being written for the UEFI Shell.

Examples

The following data is contained in a temporary file (temp.txt):

ShellCommand, "LS" 
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" 

To use the index parameter to parse the temp.txt file:

fs0:\> parse temp.txt FileInfo 3 –i 3
795