myfunc(args)
  echo "args=$args"
  echo "one "$args
  sleep 1s
  echo "two "$args
  sleep 2s

await su -c 'foo 123' then
  echo "'await ... then' done $1"

sleep 1s

await myfunc 123 then
  echo "removeme"

await myfunc 456 then |
  echo "pipe received"
  cat -
when done
  echo "'await .... then |' done"

sleep 4s

await myfunc 789 then for line
  if $line match (two|one)
    echo "line: $line"
when done
  echo "'await ... then for line' done"
