Information
Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Command Center for Security 6.2.

$fname (parse-spec) function


The file name portion of the path name given by parse-spec is returned. The parse-spec returns a standard path name with either a slash or backslash. This can be used to strip the path name, or ignore the path name component of a full path name to a file.

The following examples show target strings, parse expressions, and return values:

Target string

Parse expression

Return value

File installationDirectory\X.txt

$fname (file *)

X.txt

F1: /susr/pass.x

$fname (f1: *)

pass.x

Test - P: /x y z/aaa.exe - EOM


$fname ($delim(spdash, p: *))

aaa.exe

Explanation: The path name contains a space, so you must specify the spdash delimiter. For other delimiters, see Parse-delimiters.

C:\x\y\zzz.xls

$suffix ($fname($1))

xls

Explanation: The value is the suffix from the file at the specified path name.

C:\x\y\zzz.xls

 

$basename ($fname($1))

zzz

Explanation: The value is the file name (without the suffix) from the file at the specified path name.

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Command Center for Security 6.1