Xref: utzoo comp.unix.questions:31071 comp.unix.wizards:25439 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!emory!athena.cs.uga.edu!greg From: greg@athena.cs.uga.edu (Greg Whitlock) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: talk session Message-ID: <1991May7.000521.28186@athena.cs.uga.edu> Date: 7 May 91 00:05:21 GMT Sender: greg@athena.cs.uga.edu (Greg Whitlock) Organization: University of Georgia, Athens Lines: 81 Recently there was a post concerning the capturing of a 'talk' session. One reply was to issue the 'talk' command in the following format: talk | tee and your talk session would be captured in the file . It is then fun to simply: cat and watch your whole talk session be recreated. However, it is nearly impossible to read and since contains all the control characters from your session, it is a pain to read other- wise. A friend of mine wrote this neat little c program called 'scat' (for slow cat) which will display the talk session or other text file in reduced speed. Just specify the length of the delay. The default is 30. Hope this helps someone. ------------------------>cut here<------------------------------ /* * * scat - written by gordon.edwards@atlantaga.ncr.com * * This short program displays the contents of a file with delays * after each line. * * Invoke with the filename and optional delay on the command line. * * Example: * * scat filename or * scat filename 40 * * If no delay is specified then 30 is used as the default. */ #include main(argc, argv) int argc; char *argv[]; { int c, delay, i; FILE *fopen(), *fp; if (argc < 2) { printf("usage: %s filename [delay]\n", argv[0]); exit(-1); } if ((fp = fopen(argv[1], "r")) == NULL) { printf("%s: Can't open file %s\n", argv[0], argv[1]); exit(-1); } if (argc < 3) delay = 30*1000; else { sscanf(argv[2], "%d", &i); delay = i * 1000; } while ((c = getc(fp)) != EOF) { printf("%c", c); for (i = 0; i < delay; i++) ; } fclose(fp); } -- =============================================================================