Example: lr.get_attrib_string

In the following example, lr.get_attrib_string retrieves the name of the host parameter from the command line string

test1   -host sun2   -loop 4   -time 1.5 

where test1 is the name of the executable and host, loop and time are command line options. lr.get_attrib_string assigns the value to a variable, server. This variable is incorporated into the script and sets with which server to connect.

    String server;
    String user = USERNAME;
    String password = PASSWORD;
    ...
    server=lr.get_attrib_string("host");
    if (server==null){
        lr.message("Failed to login. Unknown host.\n");
        return 0;
    }