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

playing with IFS



Trying to optimize some code:

% output=( ${(f) "$( print -rl $output | sed [cut] )" } )

... replace with hear document:

OLDIFS=$IFS; IFS=$'\n'
% output=( $( sed [cut]' <<< $output ) )
IFS=$OLDIFS

... probably better, but it won't work without tinkering with IFS.  Can that be avoided?  I expect that the '<<<' mechanism might be unable to match the tuning of print with those options set, but perhaps there's a way.  Anyway, nice to avoid the pipe.






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