All pastes #991712 Raw Edit

Stuff

public text v1 · immutable
#991712 ·published 2008-04-21 08:42 UTC
rendered paste body
alias outsong {
  @randnum=rand(65536)
  ^assign randfile /tmp/sztmp.${randnum}
  //exec cat ~/radu.txt > ${randfile}
  @i=0
  while (i < 15) {
    @of=open($randfile R)
    if (of > 0) {
      @i=15
    }
    @i=i+1
  }
  if (of > 0) {
    while (eof($of) == 0) {
      @oneline=read($of)
      if ([$oneline]!=[-1) {
        //me $oneline
      }
    }
    @of=close($of)
  }
  ^assign -randnum
  ^assign -i
  //exec /bin/rm ${randfile}
  ^assign -randfile
  ^assign -of
  ^assign -oneline
}