Hi, folks. What I'm trying to do is to check if a number of license names are valid and I'm wonder what the best way to achieve this is.
The way I'm currently thinking of doing it is to check the output of the pst query (to get online stats for the racer). Then depending on the output (if the username isn't valid "pst: no valid username" will be returned, if the username is valid then a list of online stats will be returned) I know whether each license name is valid or not.
However, this way there is a lot of unnecessary data being returned (I don't need to know the stats for a racer if they are valid) and I need to check the validity of each username separately. Is there a better way to achieve what I want to do?
Thanks for any input.
The way I'm currently thinking of doing it is to check the output of the pst query (to get online stats for the racer). Then depending on the output (if the username isn't valid "pst: no valid username" will be returned, if the username is valid then a list of online stats will be returned) I know whether each license name is valid or not.
However, this way there is a lot of unnecessary data being returned (I don't need to know the stats for a racer if they are valid) and I need to check the validity of each username separately. Is there a better way to achieve what I want to do?
Thanks for any input.