you might try something like this

Code:
alias select6 {
  var %lines = ""
  var %num = ""
  var %i = 1
  var %fileL = $lines(overthehill.txt)
  :start
  var %num = $r(1,%fileL)
  if (%num isin %lines) { goto start }
  var %lines = %lines %num
  inc %i
  if (%i > 6) { goto next }
  else goto start
  :next
  var %i = 1
  while (%i <= 6) {
    echo -a $read(overthehill.txt,$gettok(%lines,%i,32))
    inc %i
  }
}


fixed errors, but dave's is prolly better anyway

Last edited by MikeChat; 24/05/06 01:58 AM.