Selective reads from file - 04/08/05 05:40 PM
I'm attempting to list data stored in hash file though I want to list "names only", and not "status and name" I'd like to either retrieve even numbered lines (I know its an ugly way to get names only), or be shown a more elegant alternative to retrieve the name only lines.
Data stored in the following format:
loggedin.duderich
duderich
loggedin.liambonner
liambonner
loggedin.wythe
wythe
code used to extract data
Data stored in the following format:
loggedin.duderich
duderich
loggedin.liambonner
liambonner
loggedin.wythe
wythe
code used to extract data
Code:
[color:red] alias qlist { var %x = 1 var %lines = $lines(qlist.hsh) while (%x <= $lines(qlist.hsh)) { echo -a $read(qlist.hsh,%x) inc %x } } [/color]