alias whileexample {
; a while-loop to $read all lines of "words.txt", adding the results to a variable "%string" each, separated by commas
var %n = 1, %string
while ($read(words.txt,n,%n) != $null) {
var %string = $addtok(%string,$v1,44)
inc %n
}
; for the desired output, replace all the commas in %string with "comma-and-space"
ECHO -a $replace(%string,$chr(44),$+($chr(44),$chr(32)))
}