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

Re: copying files with shell built in functions?



On Mar 28,  8:11pm, Stephane CHAZELAS wrote:
} Subject: Re: copying files with shell built in functions?
}
} On Fri, Mar 28, 2003 at 07:03:47PM +0000, Bart Schaefer wrote:
} [...]
} > zsh% >newfile <oldfile
} > 
} > works just fine.
} 
} But uses more or cat that generally don't work when there's no
} libc.

True, I forgot about that.   (It is sort of silly when the multio code
already has a `while (read()) write()' loop.)  There's always:

zsh% print -nr -- "$(<oldfile)" >newfile

or (more fun, but not necessarily less memory intensive)

zsh% zmodload zsh/mapfile
zsh% mapfile[newfile]=$mapfile[oldfile]




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