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

Re: <(<<<x) vs =(<<<x)



On Dec 21,  2:52am, Stephane Chazelas wrote:
}
} ~$ od -tc < <(<<<a)
} 0000000   a  \n
} 0000002
} 
} ~$ od -tc < =(<<<a)
} 0000000   a
} 0000001
} 
} Why the difference?

This appears to be a side-effect of =(<<<a) being optimized for no forking
in a manner similar to the optimization for $(<file).  The subshell spawned
to be able to read <(<<<a) as a pipe is appending the newline.

I don't know which variation ought to be considered "correct" ...



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