Kyle R . Burton on Thu, 4 Apr 2002 14:19:02 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Moveing large files


> $ <local-file-name ssh -e none remote-host "cat > remote-file-name"

That command looked strange to my eyes.  I never thought about it before,
but after looking at your command line and trying a few myself, it turns out
that the placement of the io shell redirection characters (< and >) in
bash don't really matter.  

I had to try it to convince myself of it, but these command lines:

  1. [user@host ~]$ <temp.txt cat >foo.txt
  2. [user@host ~]$ <temp.txt >foo.txt cat
  3. [user@host ~]$ cat <temp.txt >foo.txt
  4. [user@host ~]$ cat >foo.txt <temp.txt
  5. [user@host ~]$ >foo.txt cat <temp.txt
  6. [user@host ~]$ >foo.txt <temp.txt cat

all seem to work exactly the same.  Untill now, the only forms I've
encountered were 3 and 4.

Thanks for pointing that out.

Kyle


-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug