*BSD News Article 90731


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!surfnet.nl!news-zh.switch.ch!elna.ethz.ch!not-for-mail
From: Per Kistler <kistlerp@ezinfo.ethz.ch>
Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.questions
Subject: Re: Sync files on two FreeBSD boxes
Date: Sun, 09 Mar 1997 11:50:05 +0100
Organization: ETH
Lines: 22
Message-ID: <332295DD.41C6@ezinfo.ethz.ch>
References: <01bc2c5e$946f4780$987ac4ce@butch>
NNTP-Posting-Host: zircon-ix.ethz.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (X11; I; IRIX64 6.2 IP28)
To: Butch Evans <butche@sheltonbbs.com>
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:36841 comp.unix.questions:96673

Hi Butch 

#!/usr/bin/ksh
ftp -n machine1 <<EOF
user username password
bin
cd somedir
put myfile
quit
EOF

Then the file will be overritten. If you just want to to 
edit a line or so then rather with rsh:

rsh machine1 -l username \
      "(cd dir;perl -pi -e "'s/old/new/g'" filename)"

Bye, Per.
-- 
Per Kistler, Zuerich, Switzerland. (Unix/Perl/C++)
>>>>>>>>>>>>kistlerp@ezinfo.ethz.ch<<<<<<<<<<<<<
----------------------------------------------------------------------