I am new to Aspect and I hope someone can get me started in the right direction. I am trying to capture several data strings and assign them to string variables. I will be getting the data from a Sun (Unix) server and need to know the best way to collect the data. Here is an example of what I want to do:
Open the file "/vol/pat/peers.cfg"
Search for all lines with "node ="
this should output something like "node = host1 " and "node = host2 " (without quotes)
Search for all lines with "port ="
this should output something like "port = 104 " and "port = 4004 "
I need to strip trailing spaces and assign them to string variables. The string lengths will vary also.
My 4 variable stings values should be host1 host2 104 and 4004
Print out string variables values.
Should I use unix grep and fgrep commands to filter down to the data string I am looking for and then do a screen capture or go right to the file and do a string capture? Any help is appreciated.
Open the file "/vol/pat/peers.cfg"
Search for all lines with "node ="
this should output something like "node = host1 " and "node = host2 " (without quotes)
Search for all lines with "port ="
this should output something like "port = 104 " and "port = 4004 "
I need to strip trailing spaces and assign them to string variables. The string lengths will vary also.
My 4 variable stings values should be host1 host2 104 and 4004
Print out string variables values.
Should I use unix grep and fgrep commands to filter down to the data string I am looking for and then do a screen capture or go right to the file and do a string capture? Any help is appreciated.