Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read stdin in variable howto ?



>hi all,
>
>is there a way to use $(<) to read stdin ? it will be great for write
>something like
>
>for arg ( ${(f)"$(<)"} $@ ) treat_arg $arg

  # for arg in ${(@f)"$(cat)"}; do print "ARG: $arg"; done
  test pd
  pod
  ^D
  ARG: test pd
  ARG: pod
  #

-- 
wbw, artur



Messages sorted by: Reverse Date, Date, Thread, Author