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

Re: read stdin in variable howto ?



> What about using the following:
>    ,-----
>    | while :; do read line; test -n "$line" || break; echo $line; done
>    `-----

for the moment, i use :

typeset stdin
read -d\\0 stdin
logins=( ${(f)stdin})

but it's not as elegant as a ${(f)"$(<)"} would be.

thanks for help
mc



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