From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21202 invoked from network); 28 Mar 2003 16:58:50 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Mar 2003 16:58:50 -0000 Received: (qmail 4633 invoked by alias); 28 Mar 2003 16:57:34 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5991 Received: (qmail 4624 invoked from network); 28 Mar 2003 16:57:34 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Mar 2003 16:57:34 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.227.126.204] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Mar 2003 16:57:34 -0000 Received: from [172.17.0.252] (helo=erdbeere.schlund.de) by mxintern.kundenserver.de with esmtp (Exim 3.35 #1) id 18yxAb-0004NK-00 for zsh-users@sunsite.dk; Fri, 28 Mar 2003 17:57:33 +0100 Received: from luthien by erdbeere.schlund.de with local id 18yxCT-00031U-00 for ; Fri, 28 Mar 2003 17:59:29 +0100 Date: Fri, 28 Mar 2003 17:59:29 +0100 From: Dominik Vogt To: Zsh Users Subject: copying files with shell built in functions? Message-ID: <20030328165928.GB14934@gmx.de> Reply-To: dominik.vogt@gmx.de Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i 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 X; do echo "$X"; done < ifile > ofile and $ echo $(< ifile) > ofile (does not work because echo destroys XR and LF) or $ cat < ofile $(< ifile) EOF (does not work because it still needs a cat and the here document is mangled. Bye Dominik ^_^ ^_^