output_from() function
i'm new to specman. how do i use the output_fro开发者_JAVA技巧m() function. and what does it do?
6.1.1 docs say:
25.8.4 output_from()
Purpose:
Collect the results of a system call
Category
Routine
Syntax :
output_from(command: string): list of string
Syntax Example
log_list = output_from("ls *log");
Parameter
command
A single operating system command, with or without parameters and enclosed in double quotes.
Description:
Executes the string as an operating system command and returns the output as a list of string. Under UNIX, stdout and stderr go to the string list.
Example
<'
extend sys {
m1() is {
var log_list: list of string;
log_list = output_from("ls *log");
print log_list;
};
};
'>
精彩评论