zsh-users
 help / color / mirror / code / Atom feed
From: Dominik Vogt <dominik.vogt@gmx.de>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: copying files with shell built in functions?
Date: Fri, 28 Mar 2003 17:59:29 +0100	[thread overview]
Message-ID: <20030328165928.GB14934@gmx.de> (raw)

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 ^_^  ^_^


             reply	other threads:[~2003-03-28 16:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-28 16:59 Dominik Vogt [this message]
2003-03-28 17:30 ` Borzenkov Andrey
2003-03-28 17:46 ` Stephane CHAZELAS
2003-03-28 18:00 ` Zefram
2003-03-28 19:03   ` Bart Schaefer
2003-03-28 19:11     ` Stephane CHAZELAS
2003-03-29  3:46       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030328165928.GB14934@gmx.de \
    --to=dominik.vogt@gmx.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).