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

copying files with shell built in functions?



In a fit of mental derangement, my colleagues tried to exchange
the libc on a machine at run time and used 'mv' to rename the
file.  As you might imagine, they regretted that immediately :-)

Can anyone think of a way to copy or rename a file with only shell
built in functions?  (either zsh or bash)  I have tried things
like

  $ while read <options> X; do echo <options> "$X"; done < ifile > ofile

and

  $ echo $(< ifile) > ofile

(does not work because echo destroys XR and LF)

or

  $ cat <<EOF > ofile
  $(< ifile)
  EOF

(does not work because it still needs a cat and the here document
is mangled.

Bye

Dominik ^_^  ^_^



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