Editing file across machines

Editing file across machines

Post by mjor » Wed, 25 Jun 2003 07:11:36



I would like to write a script to edit  (nedit) a file from one machine
to another without using rlogin?

Thanks

--
Posted via http://dbforums.com

 
 
 

Editing file across machines

Post by Alexis Huxle » Wed, 25 Jun 2003 19:57:56



Quote:> I would like to write a script to edit  (nedit) a file from one machine
> to another without using rlogin?

        #!/usr/bin/ksh
        PROGNAME=`basename $0`
        HOST=$1
        FILE=$2
        rcp $HOST:$FILE /tmp/$PROGNAME.$$.cp
        ${EDITOR:-nedit} $HOST:$FILE /tmp/$PROGNAME.$$.cp
        rcp /tmp/$PROGNAME.$$.cp $FILE:$HOST
        rm -f /tmp/$PROGNAME.$$.cp

You can add usage checking, error checking and some options
(e.g. '-l' to specify alternative username for remote access,
'-s' to use scp instead of rcp), and some traps for doing tidyup
on signals, reset PATH, blah blah ....

Alexis

 
 
 

Editing file across machines

Post by Bill Marcu » Wed, 25 Jun 2003 12:56:37


On Mon, 23 Jun 2003 22:11:36 +0000, mjorg

> I would like to write a script to edit  (nedit) a file from one machine
> to another without using rlogin?

Good idea.  Use ssh instead.

--
It is often the case that the man who can't tell a lie thinks he is the best
judge of one.
                -- Mark Twain, "Pudd'nhead Wilson's Calendar"

 
 
 

1. Copy files with permissions across machines?

We are working on migrating our web/e-mail server from a red hat 9 box
to a mandrake 10.1 box. Is there a way we can copy files over while
keeping the permissions/owners on the files? If so, I assume the users
on the new box will have to have the same username and uid of the users
from the old box?
thanx
-joltman

2. what does a port 0 mean ?

3. How to synchronize files across standalone machines ?

4. Noatun icons

5. Maintaining .cshrc files across several machines

6. IPCS on Linux

7. Problems xferring file across machines using minicom

8. How do I disconnect SLIP? (reply)

9. Live editing of Unix files on Win machine continued

10. Copying files across file systems

11. moving files across file systems

12. why do structs have different sizes across machines?

13. diff across machines