prieto@aluxp.UUCP (PRIETO) (04/05/84)
Subject: Modified cu Newsgroups: net.unix I am interested in getting a modified cu program or any other program to log into a non-unix system then be able to redirect the output from the screen to a file then back to the screen, the objective is to save portions of the terminal output in a file. Any pointer or references will be appreciated.
dave@infopro.UUCP (David Fiedler) (04/06/84)
Try the following: cu | tee file "That's the biz, sweetheart..." Dave Fiedler {harpo,astrovax,philabs}!infopro!dave
ekb@link.UUCP (Eric K. Bustad) (04/08/84)
xxx Try the following: cu | tee file Actually, this won't work if the non-unix system has half-duplex lines instead of full-duplex ones. The problem is that under the -h option of cu, echoing is not turned off locally. Thus only the output from the half-duplex system is saved in "file". When I've wanted to do this, I first cu'd to the same or another UNIX, and cu'd the half-duplex system from there. This second UNIX does the echoing of my terminal input, so that both input and output appears in "file". -- = Eric Bustad (AT&T-BL, Holmdel NJ) (201)949-6257 [ihnp4!]{link|hou2c|iheds}!ekb
ted@usceast.UUCP (System Programmer) (04/10/84)
<purina bug chow> It sounds as though what Mr. Prieto wants to do is execute a non unix system's cat equivalent (eg: "type") and save the screen output, getting a file transfer system. This is certainly a reasonable thing to do, but I have had little success with Mr. Fiedler's "cu | tee" solution. Characters seem to drop out like crazy. If you have access to any 4.2 utilities, 'tip(1)' is what you want. This is a much improved cu rewrite, (Really cu exists only as an entry to tip in 4.2), and has commands tailor made for this sort of thing. (~<) It's great for logins over hard uucp lines and modem fiddling too! -- -------------------------------------------------------------------------------- Ted Nolan usceast!ted 6536 Brookside Circle Columbia, SC 29206 (feather the rast!) --------------------------------------------------------------------------------
smq@hlhop.UUCP (Steven M. Queriolo) (04/10/84)
To transfer a file (or just the results of a set of commands), I use the standard cu command. When you wish to begin the diversion to a file, simply enter (or have the remote system output): ~>: Unix_Path_Name ..... < Your commands go here, like 'type file', or something > ... ~> and, the information (i.e., the contents of the file on the remote system) is stored in the file pointed to by the Unix_Path_Name. -- Steven M. Queriolo AT&T Bell Laboratories ..........hlhop!smq
wls@astrovax.UUCP (William L. Sebok) (04/11/84)
> To transfer a file (or just the results of a set of commands), I use > the standard cu command. When you wish to begin the diversion > to a file, simply enter (or have the remote system output): > ~>: Unix_Path_Name > ..... < Your commands go here, like 'type file', or something > ... > ~> > and, the information (i.e., the contents of the file on the remote > system) is stored in the file pointed to by the Unix_Path_Name. > Steven M. Queriolo I seem to remember that when using this technique to talk to VMS with the the original cu, when one gave a VMS "TYPE" command, one either ended up with a carriage return (\r) or an extra newline embedded after every line in the file, I forget which. I also forget what tip does but I seem to remember that it also did not do it right. What is worse is when one wants to transfer text files to the VMS system. Neither cu nor tip knows enough to convert the newslines in the file to carriage returns. This definitely should be an option to tip. There are so many other options to tip, some of dubious utility. This one really should have been thought of. Almost any modem program on a micro-computer can do with ease this thing that is difficult for cu or tip. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,kpno,princeton,vax135}!astrovax!wls
rpw3@fortune.UUCP (04/12/84)
#R:aluxp:-122300:fortune:26900044:000:1270 fortune!rpw3 Apr 12 00:08:00 1984 I am almost embarrassed to post this, but here it is. To send files to a non-UNIX system (or to a UNIX system if the baud rate is so high the UNIX on the other end gags, like anything over 300 baud!), I use the amazing program 'slowcat'! Usage from cu: [ dialog with other system, TOPS-10, say ] .copy file.ext=tty: ;start the transfer ~!slowcat 30 <file.to.send >/dev/cul0 # cu ~! escape [ you see echo from other system as if you had typed file ] ^Z ;finish it . The use with UNIX is similar and obvious. (Note: no "-" before "30".) Larger args get lower transmission speeds. On my machine, running as the only user, an argument of "30" gets approximately 28 chars/sec. Your mileage may vary. ;-} Rather than tie up net resources sending to net.sources, I include the entire source of 'slowcat' here, to wit: +-------------------- | main(argc,argv) | int argc; char **argv; | { int i, c, slowness; | | slowness = ((argc > 1) ? atoi(*++argv) : 0) * 100; | | while ( read(0,&c,1) == 1){ | for(i = slowness ; --i > 0 ;); | write(1,&c,1); | } | } +-------------------- Rob Warnock UUCP: {ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3 DDD: (415)595-8444 USPS: Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065
david@varian.UUCP (04/12/84)
Bill Sebok (astrovax!wls) writes: > What is worse is when one wants to transfer text files to the VMS system, > Neither cu nor tip knows enough to convert the newslines in the file to > carriage returns. The way I have gotten around this is to make a special version of cat (which I called type) which changes newlines to carriage returns, and invoke it with the ~$ option of cu (~$type file means: Run "type file" on the local system and send the output to the remote system). In addition to the translation of newline, type also has options to send the VMS EOF character at the end of the file and to put in delays after each character (-dnumber, where the larger the number, the longer the delay), so that the output of type looks like a human typing. The delay is doubled after sending a carriage return. David Brown (415) 945-2199 Varian Instruments 2700 Mitchell Dr. Walnut Creek, Ca. 94598 {zehntel,amd70,fortune}!varian!david