postmaster@[unknown] (SMTP MAILER) (04/01/89)
----Reason for mail failure follows---- Sending mail to host drum : Unrecognized host name or address. ----Transcript of message follows---- Date: 31 Mar 89 14:26:00 WET From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V7#036 To: "baynes" <baynes@drum> Return-Path: <info-unix-request@sem.brl.mil> Received: from SEM.BRL.MIL by nusc.arpa with SMTP ; Fri, 31 Mar 89 14:25:08 EST Received: from SEM.BRL.MIL by SEM.brl.MIL id ab08972; 31 Mar 89 3:00 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa08968; 31 Mar 89 2:46 EST Date: Fri, 31 Mar 89 02:46:32 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V7#036 Message-ID: <8903310246.aa08968@SEM.BRL.MIL> INFO-UNIX Digest Fri, 31 Mar 1989 V7#036 Today's Topics: What does "munch" in C++ and/or Concurrent C do? Re: UNIX prompts (-ksh) Return from exit? Re: Some csh how-to, please Need csh alias to match patterns in history Re: Future at Berzerkeley Re: slicing the date Re: Future at Berzerkeley Re: VMS vs. UNIX s/w development tools - query Re: Some csh how-to, please Re: Re^2: Getting UNIX prompt to display current directory Driver close system call Re: csh: still trying to read file Re: VMS vs. UNIX s/w development tools - query Re: Future at Berzerkeley Re: slicing the date csh - now how about pseudo-arrays? Re: Need csh alias to match patterns in history Re: slicing the date uucp machine aliasing nroff page length Re: slicing the date Help with FTP? Re: C bug causes double fault Re: Future at Berzerkeley Japanese language and computer, help requested Re: Future at Berzerkeley Re: Getting UNIX prompt ; easy questions Re: Driver close system call Re: Implications of large memory systems Re: Need csh alias to match patterns in history Re: slicing the date Re: Future at Berzerkeley Re: Some csh how-to, please another way (was Re: slicing the date) ----------------------------------------------------------------- From: Scott Hammond <scott@rdahp.uucp> Subject: What does "munch" in C++ and/or Concurrent C do? Date: 28 Mar 89 18:01:59 GMT Followup-To: comp.lang.c++ To: info-unix@sem.brl.mil Can someone enlighten me as to what "munch" does for C++ and/or for Concurrent C? I know it performs some sort of manipulations on the object file but that's all I know. It also seems to add a lot to compile time and I want to know if I can do without it. I'm actually specifically interested in Concurrent C, but since it uses nearly the same parser as C++, I gather that "munch" is doing the same thing for both. Thanks for any information. My apologies if this is a naive question. -- Scott Hammond, R & D Associates, Marina del Rey, CA (213) 822-1715 : {ksuvax1,zardoz}!rdahp!scott : rdahp!scott@ksuvax1.cis.ksu.edu : scott@harris.cis.ksu.edu ----------------------------- From: "Bruce T. Harvey" <bruce@idsssd.uucp> Subject: Re: UNIX prompts (-ksh) Date: 28 Mar 89 17:30:48 GMT To: info-unix@sem.brl.mil In article <4549@vpk4.UUCP>, hjespers@vpk4.UUCP (Hans Jespersen) writes: > In article <2391@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes: > >In article <11080@well.UUCP> tneff@well.UUCP (Tom Neff) writes: > >> export PS1='$PWD> ' > Absolutely correct. I think Tom ment > export PS1=`$PWD> ` Nope. Tom meant '$PWD' when he said it. The reason for the single quotes is so that the shell where the definition is being made does not interpret $PWD. If it did, the current working directory of _that_shell_ would _always_ display. By quoting it, four characters ($, P, W, and D) are exported and not interpreted by ksh _until_displayed_. I don't think sh- does any interpretation of displayed variables in this manner, which is why it doesn't work this way using sh-. If you use back-quotes, as in above, you end up trying to execute a directory. (" ... Hmm. I wonder if that's why directories must be x-ecutable to be used ...") -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Bruce T. Harvey (B-}> | ... cp1!sarin!wb3ffv!idsssd!idssup!bruce (Title depends on day) | ... ctnews!idsssd!idssup!bruce (301) 584-1960 | Convergent Route Distribution Sys. - Hunt Valley, MD ----------------------------- From: "Frank I. Reiter" <frank@rsoft.uucp> Subject: Return from exit? Date: 28 Mar 89 16:28:26 GMT Keywords: curses exit signal To: info-unix@sem.brl.mil I have a small monitoring program which uses curses to update it's display every 15 seconds. It has been in use and worked fine for a couple of years with one exception: It appears that sometimes it returns from an exit! SIGINT is set to be handled by this routine: void quit() { signalson(NO); /* Leave us alone while we cleanup */ close(sysfd); clear(); refresh(); endwin(); detachutil(); /* Log us out of shared memory */ puts("watch: terminated"); exit(0); } signalson(flag) /* Enable/disable sig handling routines */ int flag; { int i; static int lastflag=YES; if(flag==YES) { signal(SIGINT,quit); signal(SIGTERM,quit); } else { signal(SIGINT,SIG_IGN); signal(SIGTERM,SIG_IGN); } i=lastflag; lastflag=flag; return(i); } When the interrupt key is sent to the process sometimes the screen will clear, the exit message will be printed, and then a few seconds later the screen is refreshed with the latest statistics. After that happens the interrupt key is ignored and we must use SIGQUIT to kill the process. Can anybody suggest why this might be happening? -- _____________________________________________________________________________ Frank I. Reiter UUCP: {uunet,ubc-cs}!van-bc!rsoft!frank Reiter Software Inc. frank@rsoft.bc.ca, a2@mindlink.UUCP Langley, British Columbia BBS: Mind Link @ (604)533-2312, login as Guest ----------------------------- From: Gregory Bollella <bollella@ra.cs.unc.edu> Subject: Re: Some csh how-to, please Date: 29 Mar 89 12:58:48 GMT Sender: news@thorin.cs.unc.edu Keywords: csh C-shell shell programming unix read To: info-unix@sem.brl.mil In article <7467@thorin.cs.unc.edu> white@white.cs.unc.edu (Brian T. White) writes: >In article <2127@pikes.Colorado.EDU>, pklammer@pikes.Colorado.EDU (Peter Klammer) writes: >> Could someone please tell me how to read a file line at a time >> into the C shell? Better yet, can you refer me to any good C-shell >> text. > >Try "The UNIX C Shell Field Guide" by Anderson and Anderson. To read >a file one line at a time, try > >foreach p ( "`cat file`" ) > set line=`echo $p` > (commands acting on $line) >end I tried the above on a large file and it did not work. csh reported Too many words from ``. The file was 118583 bytes. Does anybody have any ideas on how to get around this limit and still get one line at a time? Gregory Bolella bollella@cs.unc.edu Department of Computer Science CB# 3175 Sitterson Hall University of North Carolina Chapel Hill, NC 27599-3175 ----------------------------- From: Naim Abdullah <naim@eecs.nwu.edu> Subject: Need csh alias to match patterns in history Date: 24 Mar 89 02:46:14 GMT To: info-unix@sem.brl.mil A friend of mine wants a csh alias that will print all lines in the history list that match a pattern if one is supplied, otherwise just print the history. He asked me and I suggested the following csh alias: alias h ' \ if ( "X\!*" == "X" ) then \ history \ else \ history | grep \!* \ endif' For some reason, this does not work. Can some kind soul explain why and supply a working answer to this problem ? Thanks. Naim Abdullah Dept. of EECS, Northwestern University Internet: naim@eecs.nwu.edu Uucp: {oddjob, chinet, att}!nucsrl!naim ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Future at Berzerkeley Date: 29 Mar 89 17:07:04 GMT To: info-unix@sem.brl.mil In article <3095@stpstn.UUCP> aad@stepstsone.com writes: -In article <4572@pt.cs.cmu.edu> jps@cat.cmu.edu (James Salsman) writes: ->a long time, but SysV will always be more stable. -Let's see: svr1,svr2,svr3,svr3.2,svr4... Seems like they come out with -versions a lot more often. He said "stable", not "stagnant". ----------------------------- From: "R. E. Mackey" <mackey@ihlpb.att.com> Subject: Re: slicing the date Date: 29 Mar 89 15:25:14 GMT To: info-unix@sem.brl.mil In article <216000010@s.cs.uiuc.edu>, carroll@s.cs.uiuc.edu writes: > [......] The question is, how can I cut up the output of > date to put the hours, minutes, and seconds into seperate variables? Thanks! The line eval `date '+hr=%H;min=%M;sec=%S'` will set hr to the current hour, min to the current minute, and sec to the current second. You're welcome. -- Ron Mackey - AT&T Bell Laboratories UUCP: att!ihlpb!mackey 2000 N. Naperville Road WORK: (312) 979-2140 Naperville, Illinois 60566 OFFICE: IH 2C-423 ----------------------------- From: Chuck Karish <karish@forel.stanford.edu> Subject: Re: Future at Berzerkeley Date: 29 Mar 89 16:02:17 GMT Sender: USENET News System <news@portia.stanford.edu> Keywords: Leading Edge == Bottom Line To: info-unix@sem.brl.mil In article <3095@stpstn.UUCP> aad@stepstsone.com wrote: >In article <4572@pt.cs.cmu.edu> jps@cat.cmu.edu (James Salsman) writes: >>a long time, but SysV will always be more stable. >Let's see: svr1,svr2,svr3,svr3.2,svr4... Seems like they come out with >versions a lot more often. Yes, but it's a stable development environment because AT&T specifies what backward compatibility they'll provide in new versions. This may be carried a bit too far, to the extent that they're reluctant to fix misfeatures for fear of breaking customers' work-arounds. Any developer who's happy with the old functionality can ship products for the newer version of the OS without having to port to it. Chuck Karish hplabs!hpda!mindcrf!karish (415) 493-7277 karish@forel.stanford.edu ----------------------------- From: Todd Merriman <todd@stiatl.uucp> Subject: Re: VMS vs. UNIX s/w development tools - query Date: 29 Mar 89 12:47:08 GMT Keywords: VMS UNIX tools To: info-unix@sem.brl.mil In article <401@bionov.UUCP> rayl@bionov.UUCP (Ray Lillard) writes: >I am a software consultant working with a client company with lots >of code developed for RSX-11. We are casting about for a new >system (hardware and software) to replace the existing imbedded >target system......... I do cross development between Unix, VMS, and MSDOS; and I have a few opinions on the subject. I consider Unix to be a superior *development* environment, but VMS to be a superior *production* environment. The variety of tools and power of the Shell make Unix an ideal choice for technical types and programmers. The sophistication of VMS, combined with its excellent documentation and reliability make it the clear winner in production. ...!gatech!stiatl!todd Todd Merriman * 404-377-TOFU * Atlanta, GA Note: I have no idea what my employer's views on the subject are. ----------------------------- From: Seth Robertson <sethr@cunixc.cc.columbia.edu> Subject: Re: Some csh how-to, please Date: 29 Mar 89 18:03:54 GMT Keywords: csh C-shell shell programming unix read To: info-unix@sem.brl.mil In article <7485@thorin.cs.unc.edu> bollella@ra.UUCP (Gregory Bollella) writes: >>In article <2127@pikes.Colorado.EDU>, pklammer@pikes.Colorado.EDU (Peter Klammer) writes: >>> Could someone please tell me how to read a file line at a time >>> into the C shell? Better yet, can you refer me to any good C-shell >>> text. >> [Method deleted] >I tried the above on a large file and it did not work. csh reported > Too many words from ``. >The file was 118583 bytes. Does anybody have any ideas on how to >get around this limit and still get one line at a time? I don't know how to do it in csh, but the method that works for (k)sh is: #! /bin/sh exec 3<&0 < /usr/local/lib/ctrsuns while read test do echo $test rsh $test -n "$1" done exec 0<&3 3<&- This gives the error missing name for redirect. You might be able to fool around with it and get it working... -Seth seth@ctr.columbia.edu ----------------------------- From: Michael Morrell <morrell@hpsal2.hp.com> Subject: Re: Re^2: Getting UNIX prompt to display current directory Date: 28 Mar 89 21:09:29 GMT To: info-unix@sem.brl.mil / hpsal2:comp.unix.questions / lbn@ksuvax1.cis.ksu.edu (Lars Bo Nielsen) / 7:52 am Mar 27, 1989 / You are right. Here are the modified (quicker) versions: 2) Only name of current dir: alias cd 'cd \!*; set foo=$cwd; set prompt=$foo:t"% "' 3) Include name of machine in prompt alias cd 'cd \!*; set prompt=$host":"$cwd"% "' or alias cd 'cd \!*; set foo=$cwd; set prompt=$host":"$foo:t"% "' ---------- I don't think you need the extra variable foo. "set prompt=$cwd:t" works just fine. Michael ----------------------------- From: "Wm. Tseng" <williamt@babel.sandiego.ncr.com> Subject: Driver close system call Date: 29 Mar 89 19:59:35 GMT Sender: news@ncr-sd.sandiego.ncr.com To: info-unix@sem.brl.mil I have a question about driver close routine. Thanks in advance for any answer. If a process exits or terminates before it closes a driver, does kernel close the driver for that process ? In user process, several processes can open the same driver. Are driver open and close routines executed as many time as process calls it ? Does kernel control the close system call, so close is only executed once (when last process closes it)? When system crash, does kernel close all the opened file and driver or just leave them open ? william williamt@babel.sandiego.ncr.com ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: csh: still trying to read file Date: 29 Mar 89 15:39:44 GMT Keywords: csh C shell read programming unix To: info-unix@sem.brl.mil pklammer@pikes.Colorado.EDU (Peter Klammer) writes: \... what I want is to read a file a line at a time in the \midst of a csh script that is in dialogue; that is, redirecting \stdin is not acceptable. You don't want csh scripts, if you want to avoid problems. Use sh scripts: i=0 exec 3< foo while read bar <&3 do i=`expr $i + 1` echo "line $i: $bar" done \... Another csh mystery (at least until I get my book, maybe): if I prepare \a csh script file (with the mandatory "#" on line 1) and chmod +x it, \and then invoke it from a subdirectory, it is run from my HOME directory! ... Probably there's a cd command in your .cshrc. Furthermore, try if your kernel recognizes `#!/bin/csh -f' on line 1. -- Modeless editors and strong typing: |Maarten Litmaath @ VU Amsterdam: both for people with weak memories. |maart@cs.vu.nl, mcvax!botter!maart ----------------------------- From: Piet van Oostrum <piet@cs.ruu.nl> Subject: Re: VMS vs. UNIX s/w development tools - query Date: 29 Mar 89 15:46:34 GMT Sender: piet@ruuinf.cs.ruu.nl Followup-To: comp.software-eng Keywords: UNIX tools To: info-unix@sem.brl.mil In article <401@bionov.UUCP>, rayl@bionov (Ray Lillard) writes: I have extolled the virtues of the UNIX software `environment and have been told that ..... My question is: What do people generally consider to be a ``software development environment''. Is it something like the collection of tools that Unix has or is there much more in it, for example tools for the specification and design parts of the software life cycle. What experience do you have with additional tools in the Unix environment? -- Piet van Oostrum, Dept of Computer Science, University of Utrecht Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet) ----------------------------- From: Guy Harris <guy@auspex.uucp> Subject: Re: Future at Berzerkeley Date: 29 Mar 89 20:25:38 GMT Keywords: Leading Edge == Bottom Line To: info-unix@sem.brl.mil > When bsd and System V are merged, will the holders of 32V licenses >still be able to get source to newer bsd versions? Or will everyone wishing >to get source have to go out and get a SV.4 licence? I think you misunderstand what "when bsd and System V are merged" means. It means that S5R4 will be picking up BSD stuff, not that S5 and BSD will become one and the same thing. As far as I know, Berkeley isn't going to convert to S5R4, so presumably a 32V licence should continue to be sufficient. ----------------------------- From: Dave Turner <dmt@pacbell.com> Subject: Re: slicing the date Date: 29 Mar 89 18:38:27 GMT To: info-unix@sem.brl.mil In article <216000010@s.cs.uiuc.edu> carroll@s.cs.uiuc.edu writes: >Allright, I can't figure this out. I'm trying to put the current system >time in my prompt. Under SysV, I can use 'cut' to pick out the seperate >hours, minutes, and seconds from 'date'. For non-SysV types, 'cut' lets >you pick out fields using either delimiter characters or absolute column You might try: date "+%H %M %S" | read HH MM SS echo $HH echo $MM echo $SS -- Dave Turner 415/542-1299 {att,bellcore,sun,ames,pyramid}!pacbell!dmt ----------------------------- From: Peter Klammer <pklammer@pikes.colorado.edu> Subject: csh - now how about pseudo-arrays? Date: 29 Mar 89 22:53:01 GMT Keywords: csh C shell UNIX programming arrays subscripts To: info-unix@sem.brl.mil OK, I'm learning, I'm getting better at this... Yes, our .cshrc ended with 'cd', apparently to initiate the pretty prompt via the cd alias. So if I change that to 'cd .' instead, we get the pretty prompt without reverting to HOME in every subshell. Now I would like to know if csh can be warped into array-like subscripting. I am trying to write a table-driven menu in a csh script, so that I can loop through cases instead of adding another explicit paragraph of case code whenever we expand the menu. Here's the rough outline: ------------------------------------------------------------ #csh # menu4 @ n = 0 @ n += 1; set entry$n = (EXIT EXIT) @ n += 1; set entry$n = (ADDUSER ADD a new user account) @ n += 1; set entry$n = (MODUSER MODIFY a user account) @ n += 1; set entry$n = (DELUSER DELETE a user account) @ n += 1; set entry$n = (SHOWUSER SHOW a user account) @ n += 1; set entry$n = (ADDCLASS Add a new CLASS) @ n += 1; set entry$n = (ADDGROUP Add a new GROUP) @ n += 1; set entry$n = (DELGROUP CANCEL a group) @ n += 1; set entry$n = (INSTRUCT INSTRUCTION) #This, for specific case 3, works: set command = $entry3[1] set prompt = "${entry3[2-]}" echo The command $command will $prompt #This, for general case i, fails, with message 'Variable Syntax': @ i = 1 while( $i <= $n ) set command = ${entry$i[1]} set prompt = "${entry$i[2-]}" echo The command $command will $prompt @ i += 1 end ------------------------------------------ That's as close as I have been able to get in a couple days trying without the Anderson book. I'd be happy to consider another approach, but for some other reasons we're kinda bound to doing it in C-shell. (I'd rather do it in awk, but our awk here can't import the arv command line, so it's (snicker) awkward.) ----------------------------- From: Marco Zagha <marcoz@marcoz.boltz.cs.cmu.edu> Subject: Re: Need csh alias to match patterns in history Date: 29 Mar 89 20:36:59 GMT To: info-unix@sem.brl.mil In article <3680046@eecs.nwu.edu>, naim@eecs.nwu.edu (Naim Abdullah) writes: > > alias h ' \ > if ( "X\!*" == "X" ) then \ > history \ > else \ > history | grep \!* \ > endif' > > For some reason, this does not work. Can some kind soul explain why > and supply a working answer to this problem ? I think this will do the trick: alias hh 'history | grep "\!*"' This works because 'grep ""' is not the same as 'grep'. Your alias produces strange behavior. Neither the "if" or the "else" condition is ever executed. I don't know why. == Marco (marcoz@cs.cmu.edu) -- ----------------------------- From: Dennis Pelton CSM Contractor x8876 <dgp@ncsc1.at&t.ncsc> Subject: Re: slicing the date Date: 29 Mar 89 15:57:14 GMT To: info-unix@sem.brl.mil In article <216000010@s.cs.uiuc.edu>, carroll@s.cs.uiuc.edu writes: > > Allright, I can't figure this out. I'm trying to put the current system > time in my prompt. Under SysV, I can use 'cut' to pick out the seperate > hours, minutes, and seconds from 'date'. For non-SysV types, 'cut' lets > you pick out fields using either delimiter characters or absolute column > counts. I found a way to do this using Ksh (with the pattern matchers), > but it is very ugly. The question is, how can I cut up the output of > date to put the hours, minutes, and seconds into seperate variables? Thanks! > > Alan M. Carroll "And then you say, > carroll@s.cs.uiuc.edu We have the Moon, so now the Stars..." - YES > CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll OK, here's one way: hrs=`date +'%H'` min=`date +'%M'` sec=`date +'%S'` Andhere's another: date +'%H %M %S' >now read hrs min sec <now And a follow-up question for those who know more than I: Why is it that the following does NOT work? The variables are empty. date +'%H %M %S' | read hrs min sec Dennis Pelton att.COM.UUCP!ncsc5!dgp ----------------------------- From: Jonathan Hanna <yonatan@dybbuk.uucp> Subject: uucp machine aliasing Date: 29 Mar 89 04:25:35 GMT Keywords: uucp HDB To: info-unix@sem.brl.mil Apparently BSD 4.3 uucp has a file of machine aliases (L.aliases). Does HDB uucp have any simular facility? If not, any idea how to do it or how one may want to represent it in the Systems or Permissions files? -- Jonathan Hanna yonatan@dybbuk.uucp ...uunet!attcan!utzoo!yunexus!dybbuk!yonatan ----------------------------- From: Joe Wells <jbw@bucsb.uucp> Subject: nroff page length Date: 30 Mar 89 01:30:18 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil Dear Wise and Knowlegeable People (with Source Access), It would be very useful to be able to tell nroff that its page length is infinite (or just very very large). This would probably involve modifying one of the files in /usr/lib/term that come with nroff. However, I haven't been able to find documentation on the format of these files. Does anyone know enough about this to help? I would consider editing the binary an adequate solution. -- Joe Wells INTERNET: jbw%bucsf.bu.edu@bu-it.bu.edu IP: [128.197.10.201] UUCP: ...!harvard!bu-cs!bucsf!jbw ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: slicing the date Date: 30 Mar 89 02:57:10 GMT To: info-unix@sem.brl.mil In article <431@ncsc1.AT&T.NCSC> dgp@ncsc1.AT&T.NCSC (Dennis Pelton CSM Contractor x8876) writes: >Why is it that the following does NOT work? > date +'%H %M %S' | read hrs min sec Because the shell built-in "read" runs in a subshell due to the pipeline. You're setting the variables in a subshell, all right, but that isn't what you wanted. ----------------------------- From: Paul Houtz <gph@hpsemc.hp.com> Subject: Help with FTP? Date: 29 Mar 89 22:31:47 GMT To: info-unix@sem.brl.mil I am just starting to use ftp, and I have a few questions: 1. How does it work? I am currently trying to get into some anonymous sites, and am experiencing the following difficulties: a: I will be connected to the site, some line noise or something knocks me off, and then I can no longer connect to that site. I get the following error: ftp: connect: No route to host b: Some sites I attempt connection to give me the error ftp: (site address): Unknown host Once I have been bounced off, I seem to get the first message above no matter what machine I attempt to open. Is it possible that getting bounced screws things up on my machine for some undetermined amount of time (say--to the next boot up)? 2. Is there another method of specifying the address of machine, rather than the Arpanet address (i.e., machine.university.edu)? In some of the site lists, the give a bunch of numbers with periods (302.333.23.2349) that appear to be some kind of address. What is this? Thanks for your time and help! Paul Houtz HP Technology Access Center 10670 N. Tantau Avenue Cupertino, Ca 95014 (408) 725-3864 hplabs!hpda!hpsemc!gph gph%hpsemc@hplabs.HP.COM ----------------------------- From: "M.R.Murphy" <mrm@sceard.uucp> Subject: Re: C bug causes double fault Date: 30 Mar 89 02:16:17 GMT To: info-unix@sem.brl.mil In article <660@micropen> dave@micropen (David F. Carlson) writes: ! !The truth is that Microport early versions had the potential to corrupt the !kernel stack on floating point exceptions, which is what this should be. !This was supposedly fixed several versions ago and I never had saw this !again. (It was a showstopper though for a multi-user development machine: !too insecure to use.) ! The program as written doesn't double panic uPort V/AT 2.2.2 with 80287, or 2.3, 2.4 without 80287. With other combinations, your mileage may vary:-) Which, incidentally, points out one of the large problems in getting the bugs out of an operating system which is expected to run in who-knows-how many hardware configurations (CPU,motherboard,disk controller,disk drive, and on and on...). The hardware used in this exhaustive test was no-name clone. -- Mike Murphy Sceard Systems, Inc. 544 South Pacific St. San Marcos, CA 92069 mrm@sceard.UUCP {hp-sdd,nosc,ucsd}!sceard!mrm +1 619 471 0655 ----------------------------- From: Larry Taborek <larry@macom1.uucp> Subject: Re: Future at Berzerkeley Date: 30 Mar 89 12:54:35 GMT To: info-unix@sem.brl.mil My question is, since Berkeley has been paying licsence fees to AT&T for portions of their code, will AT&T pay Berkeley for portions of their code included in SVR4? If not, then will AT&T price SVR4 so that users are not paying for portions of code that AT&T did not buy or develop? Anyone from AT&T or Berkeley wish to comment? -- Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems larry@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 703-758-7000 ----------------------------- From: Francois Wauthier <fw@sunbim.uucp> Subject: Japanese language and computer, help requested Date: 29 Mar 89 13:15:34 GMT Keywords: japanese, unix, kana, kanji To: info-unix@sem.brl.mil Hello World, We are planning to port one of our product to .... Japanese. So we need informations about Japanese Unix, Japanese Keyboards, Japanese fonts, Kanji-Kana coding, ... and all these kind of subjects. So if you have informations or references to informations related to these subjects, please email at UUCP.mcvax!prlb2!sunbim!fw or fw@sunbim.be By the way, I am learning Japanese, so if you have any reference to a good Kanji dictionary, it would be helpfull Thanks in advance Sayoonara Francois Wautier --------------------------------------------------------------- Francois Wautier | I like trafic lights (ter) BIM | But only when they're green Mail: fw@sunbim.be | (from a Monty Python's song) UUCP.mcvax!prlb2!sunbim!fw --------------------------------------------------------------- ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Future at Berzerkeley Date: 30 Mar 89 17:23:16 GMT To: info-unix@sem.brl.mil In article <4814@macom1.UUCP> larry@macom1.UUCP (Larry Taborek) writes: >My question is, since Berkeley has been paying licsence fees to >AT&T for portions of their code, will AT&T pay Berkeley for >portions of their code included in SVR4? If not, then will AT&T >price SVR4 so that users are not paying for portions of code that >AT&T did not buy or develop? I'm sure that AT&T's lawyers have made the necessary contractural arrangements with all providers of software that AT&T will be distributing. I'm also sure that they're not going to disclose the details of any such arrangement just because you're curious about it. The pricing for SVR4 has not yet been announced. The implied accusation of theft that lies behind your questions is, to the best of my knowledge (and I do have some inside knowledge) unfounded and demands an apology. ----------------------------- From: David J Bell <dbell@cup.portal.com> Subject: Re: Getting UNIX prompt ; easy questions Date: 29 Mar 89 20:45:53 GMT To: info-unix@sem.brl.mil >< P.S.3: To those people who continue flaming about frequent and repeated >< postings of elementary questions in this news group: Short of starting >< a comp.unix.questions.elementary, if the answer to the >The group comp.unix.questions was started *specifically* because there >were a lot of questions being asked in comp.unix.wizards that weren't >wizard-level questions - remember that new users need to learn things, >too, and (after we've reminded them to RTFM) there are a lot of things >that are not obvious to an inexperienced user - even things that are in >the manuals often need a lot of thought, especially because ><heretical statements follow> > some of the manual pages aren't all that well-written, and > sometimes you have to know where to look before you look there. ******* SOMETIMES???? ******* OFTEN the only way to find something is to have already RT<#!&*@$>FM, and virtually MEMORIZED it... Thank the UNIX gods for online man! Now if man were more like Hypertext... Dave dbell@cup.portal.com ----------------------------- From: Roger Collins <rogerc@ncrcae.columbia.ncr.com> Subject: Re: Driver close system call Date: 30 Mar 89 14:04:34 GMT To: info-unix@sem.brl.mil In article <1193@ncr-sd.SanDiego.NCR.COM> williamt@babel.SanDiego.NCR.COM (Wm. Tseng) writes: > > If a process exits or terminates before it closes a driver, does kernel close > the driver for that process ? Yes. All files (includes device nodes, regular files, pipes, etc.) are closed. > In user process, several processes can open the > same driver. Are driver open and close routines executed as many time as process > calls it ? Yes and no. Yes for opens, no for closes. All opens get to the driver. Only the last close gets to the driver. > Does kernel control the close system call, so close is only executed > once (when last process closes it)? You got it, but not to confuse anyone else: You meant to say, "...so *the driver's* close is only executed once..." The kernel does execute close logic for every close system call (decrement the reference counter for example), it just doesn't call the driver's close routine until the reference counter is zero. > When system crash, does kernel close all > the opened file and driver or just leave them open ? No. The kernel leaves everything basically as is (except for syncing the drives). This is probably vendor specific; I know only about the NCR TOWER. -- Roger Collins NCR - E&M Columbia rogerc@ncrcae.Columbia.NCR.COM ----------------------------- From: Roger Collins <rogerc@ncrcae.columbia.ncr.com> Subject: Re: Driver close system call Date: 30 Mar 89 14:13:00 GMT To: info-unix@sem.brl.mil In article <4337@ncrcae.Columbia.NCR.COM> I write: > > Yes. All files (includes device nodes, regular files, pipes, etc.) are > closed. Oops. The question was does the kernel close the *driver* when a process terminates? The answer is clear if you read the rest of my posting, but just in case: All the files opened by the process are closed. If the file that is the device node for the driver is closed and the reference count is zero (last close for the device), then... yes, the driver gets closed when the process terminates. Otherwise no. ----------------------------- From: Dan Schlitt <dan@ccnysci.uucp> Subject: Re: Implications of large memory systems Date: 30 Mar 89 18:53:43 GMT To: info-unix@sem.brl.mil In article <68@crdgw1.crd.ge.com> barnett@crdgw1.crd.ge.com (Bruce Barnett) writes: :Another thing to consider about 1 GByte Memory workstations, is that :when the systems have more potential, the creative researcher finds :a way to use that power. They thought 64K was enough. Then 256K was :enough.... : At the first usenix conference I attended there were questions from the audience about how more than 1 Mbyte could be best put to use on a unix system. They got answers like "use it as a fast disk" :-) Make the memory available and people will find lots of good ways to use it. And not always the ones that you think of beforehand. -- Dan Schlitt Manager, Science Division Computer Facility dan@ccnysci City College of New York dan@ccnysci.bitnet New York, NY 10031 (212)690-6868 ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Need csh alias to match patterns in history Date: 30 Mar 89 05:38:28 GMT Keywords: sed, sed, sed, csh, Bill 'bug' Joy, Bugs Bunny To: info-unix@sem.brl.mil naim@eecs.nwu.edu (Naim Abdullah) writes: \A friend of mine wants a csh alias that will print all lines in \the history list that match a pattern if one is supplied, otherwise \just print the history. \He asked me and I suggested the following csh alias: \alias h ' \ \if ( "X\!*" == "X" ) then \ \history \ \else \ \history | grep \!* \ \endif' \For some reason, this does not work. Welcome to csh! Generally it doesn't like foreach, while, etc. in aliases. Solutions: alias h 'set q=(\!*); eval h$#q' alias h0 history alias h1 '(history | sed -n -e \$q -e /"$q"/p)' or alias h 'if ("\!*" == "") set status=1 &&'\ 'history | sed -n -e \$q -e /"\!*"/p ||'\ history or alias h 'if (\!* == "") set status=1 &&'\ 'history | sed -n -e \$q -e /\!*/p ||'\ history The final version causes csh to complain if multiple arguments are given. BTW, it's obvious why I used sed instead of grep. -- Modeless editors and strong typing: |Maarten Litmaath @ VU Amsterdam: both for people with weak memories. |maart@cs.vu.nl, mcvax!botter!maart ----------------------------- From: carroll@s.cs.uiuc.edu Subject: Re: slicing the date Date: 29 Mar 89 17:24:00 GMT Nf-ID: #R:s.cs.uiuc.edu:216000010:s.cs.uiuc.edu:216000011:000:747 Nf-From: s.cs.uiuc.edu!carroll Mar 29 11:24:00 1989 To: info-unix@sem.brl.mil RE: Slicing the date I've gotten several replies, and I need to clarify something - I have tried the '+' notation on the 'date' command to get it to format its output. The OS running here (I believe 4.3BSD) does not accept that. Any argument is assumed to be an attempt to *set* the date, not format it, according to the man pages and actual use. I was moved (against my will) from SysV to BSD, and this is something that I lost - I used to use the date '+%H:%M:%S' format, and it doesn't work anymore. That's why I have to slice the normal output. Alan M. Carroll "And then you say, carroll@s.cs.uiuc.edu We have the Moon, so now the Stars..." - YES CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll ----------------------------- From: noe@s.cs.uiuc.edu Subject: Re: slicing the date Date: 29 Mar 89 23:01:00 GMT Nf-ID: #R:s.cs.uiuc.edu:216000010:s.cs.uiuc.edu:216000012:000:451 Nf-From: s.cs.uiuc.edu!noe Mar 29 17:01:00 1989 To: info-unix@sem.brl.mil Maybe expr will work? Again, it's going to look sort of hideous, but it should work. For example, if date produces "Wed Mar 29 16:57:30 1989" then NOW=`date` PS1=`expr "$NOW" : '... ... \(..\)'` would set PS1=29, the day of the month. This is Bourne shell, by the way, and would also work in Kourne shell (-: but not C-shell. I assume anyone forcibly removed from a System V environment at least has the good sense to avoid csh like the plague. ----------------------------- From: Eduardo Krell <ekrell@hector.uucp> Subject: Re: Future at Berzerkeley Date: 31 Mar 89 00:32:29 GMT Sender: netnews@ulysses.homer.nj.att.com To: info-unix@sem.brl.mil In article <4814@macom1.UUCP> larry@macom1.UUCP (Larry Taborek) writes: >My question is, since Berkeley has been paying licsence fees to >AT&T for portions of their code, will AT&T pay Berkeley for >portions of their code included in SVR4? As far as I know, AT&T is negotiating with Sun to merge SunOS features into SVR4, not with Berkeley. What the financial arrangements between AT&T and Sun are, I have no idea. Does Sun pay Berkeley for using BSD code in SunOS? How about all other vendors who are "BSD derivatives"? Isn't BSD code public domain (that is, BSD code that is not derived from AT&T)? If so, why should AT&T or Sun or anyone else have to pay for getting something that's already in the public domain? Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com ----------------------------- From: "Randal L. Schwartz @ Stonehenge" <merlyn@intelob.intel.com> Subject: Re: Some csh how-to, please Date: 30 Mar 89 19:29:13 GMT Sender: news@omepd.uucp Keywords: csh C-shell shell programming unix read Posted: Thu Mar 30 11:29:13 1989 To: info-unix@sem.brl.mil In article <1175@Portia.Stanford.EDU>, karish@forel (Chuck Karish) writes: | [ a lot of stuff deleted] | An sh script to do this job would look like | | cat file | | while read fie | do | echo A $fie | done | | No magic cookies needed; 'read fie' fails at EOF. | A pipe or redirect after 'done' receives the entire output of the loop. | | csh is OK as an interactive command line interpreter. As a programming | language, it's not so hot. My advice would be to get a copy of | Kernighan and Pike, and use sh instead. Why do people use 'cat' at every opportunity? Maybe that's why they sell so many multiprocessor machines? :-) :-) Simpler: while read fie do something with $fie done <file no additional processes. I agree about sh vs csh. But I won't get started in *that* religious war. Get ksh... the best of both worlds (hee hee)... A unix wizard (or one that plays one on TV...), -- / Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 \ | on contract to BiiN (for now :-) Hillsboro, Oregon, USA. | |<@intel-iwarp.arpa:merlyn@intelob.intel.com> ...!uunet!tektronix!biin!merlyn | \ Cute quote: "Welcome to Oregon... home of the California Raisins!" / ----------------------------- From: "Randal L. Schwartz @ Stonehenge" <merlyn@intelob.intel.com> Subject: another way (was Re: slicing the date) Date: 30 Mar 89 19:41:44 GMT Sender: news@omepd.uucp Posted: Thu Mar 30 11:41:44 1989 To: info-unix@sem.brl.mil In article <1177@Portia.Stanford.EDU>, karish@forel (Chuck Karish) writes: | set `date | tr ':' ' '` | hr=$4 | min=$5 | sec=$6 | | If that's not ugly enough for you, use this instead: | | expr "`date`" \: ".*\([ 0-9][0-9]:..\):.*" For the truly ugly (and no additional processes), try: oldIFS="$IFS" IFS=": "; set - `date`; hr=$4 min=$5 sec=$6 IFS="$oldIFS" Amazing what /bin/sh can do for you if you let it. :-) (I'm trying to write EMACS in /bin/sh... anyone want to help? :-) Just another UNIX hacker, -- / Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 \ | on contract to BiiN (for now :-) Hillsboro, Oregon, USA. | |<@intel-iwarp.arpa:merlyn@intelob.intel.com> ...!uunet!tektronix!biin!merlyn | \ Cute quote: "Welcome to Oregon... home of the California Raisins!" / ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (03/19/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 15 Mar 90 06:59:00 MST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V9#092 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Thu, 15 Mar 90 06:49:28 MST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab06497; 15 Mar 90 6:01 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa06485; 15 Mar 90 5:45 EST Date: Thu, 15 Mar 90 05:45:28 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V9#092 Message-ID: <9003150545.aa06485@SEM.BRL.MIL> INFO-UNIX Digest Thu, 15 Mar 1990 V9#092 Today's Topics: fcntl Re: fcntl Re: *nix - an abbreviation? Re: Motif shared library? Starting a session at a terminal remotely ftp site for uuencode/decode source in PD Re: troff fonts with me macros Re: Printer accounting and cutoff from UNIX: is it possible? Re: signal problems on BSD Intro to sockets? Re: Kermit vs uugetty BSD4.3 For Banking interprocess communication cache parity error Re: RPC programming ----------------------------------------------------------------- From: Jerome Freedman <freedman@granite.cr.bull.com> Subject: fcntl Date: 13 Mar 90 12:57:55 GMT To: info-unix@sem.brl.mil I know what the entry point(s) to ioctl are (I've seen enough drivers but where are the fcntl entry points? There is sort of an overlap there. Will a fcntl cause a call to dev_ioctl? Jerry Freedman,Jr ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: fcntl Date: 15 Mar 90 00:18:39 GMT To: info-unix@sem.brl.mil In article <1990Mar13.125755.9720@granite.cr.bull.com> freedman@granite.cr.bull.com (Jerome Freedman) writes: > I know what the entry point(s) to ioctl are (I've seen >enough drivers but where are the fcntl entry points? >There is sort of an overlap there. Will a fcntl cause >a call to dev_ioctl? Well, it's not supposed to -- fcntl() was introduced specifically to play with the file table entries, which is something the device driver is not supposed to know (or care) about. ----------------------------- From: Roger Gonzalez <rg@uunet!unhd> Subject: Re: *nix - an abbreviation? Keywords: sorry; some misunderstandings :-( Date: 13 Mar 90 13:46:02 GMT To: info-unix@sem.brl.mil Yep, as you said A/UX and others don't fit the *IX. For that matter, one of our systems runs UNOS, which is a UN* :-) -- UUCP: ..!uunet!unhd!rg | USPS: Marine Systems Engineering Laboratory BITNET: r_gonzalez at unhh | University of New Hampshire PHONE: (603) 862-4600 | Marine Programs Building FAX: (603) 862-4399 | Durham, NH 03824-3525 ----------------------------- From: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> Subject: Re: *nix - an abbreviation? Keywords: sorry; some misunderstandings :-( Date: 14 Mar 90 22:19:17 GMT To: info-unix@sem.brl.mil In article <1990Mar13.134602.12921@uunet!unhd> rg@unhd.unh.edu.UUCP (Roger Gonzalez ) writes: : Yep, as you said A/UX and others don't fit the *IX. For that matter, : one of our systems runs UNOS, which is a UN* :-) How 'bout we switch to normal regular expressions and say something like: (u.*[nx]|[rn].*x|ix) That gets most of 'em, and maybe a few that haven't been invented yet. Or perhaps (^u|[ux]$) Or maybe that should that be (^u|[ux]$|osf) Probably get a false positive with that one, though. :-) Larry Wall lwall@jpl-devvax.jpl.nasa.gov ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Motif shared library? Date: 13 Mar 90 19:34:24 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil >The .sa file may have to contain code, if the address of a function is >referenced by both library code and library client code (e.g. mem_rop in >the pixrect library). Yup, I'd forgotten that little Tale of Terror from 4.0 development days. If you have to do something like if (foo->bar->bletch == mem_rop) { /* * Do special memory pixrect stuff */ } else { /* * Do other pixrect stuff */ } this comes into play (i.e., it's not *any* reference by name that causes problems, it's references that actually care about the address of the function as something other than the target of a jump). ----------------------------- From: dec@winston.sr.com Subject: Starting a session at a terminal remotely Date: 13 Mar 90 21:27:16 GMT To: info-unix@sem.brl.mil I have to start a session programaticly on a terminal, the terminal is local to my machine, but for reasons that make no difference I am forced to start the session for them. (meaning that instead of letting someone log into a script or anything else, the data entry screen has to be there for them). Unfortunately I can not make the data entry program open the dev I want to use because it is an existing package. I am running SCO XENIX on everex 286 systems, version 2.2.3. Please help me! Thanks in advance Dave David Compton, 900 W. Alameda, Burbank, CA, 91506 U.S.A, Work Phone 818-843-7311 UUCP: ..!winston!dec INTERNET: dec@winston.sr.com Home Phone 805-583-4345 ----------------------------- From: "David J. Harr" <hammersslammers1@oxy.edu> Subject: ftp site for uuencode/decode source in PD Date: 13 Mar 90 21:40:33 GMT To: info-unix@sem.brl.mil Does anyone know where I can find the source for uuencode/uudecode? I have these huge files that I encoded on a Sun before mailing them to myself on a Prime, but I get here and I find that Primix, the Prime implementation of Unix, does not include these utilities in its standard distribution. As a result, I am stuck here with > 50 megabytes of stuff and no way to use it. Any help would be appreciated. Please e-mail me as I do not really follow this newsgroup regularly. Thank you. David ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: troff fonts with me macros Date: 14 Mar 90 00:35:04 GMT To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and I had to do this with my USENET Manual Set and came up with the following: .nr pp 8 .nr sp 8 .nr tp 8 to set it to 8 point. I added these lines after the .so for the me macros. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: "John E. Prussing" <jep@uxh.cso.uiuc.edu> Subject: Re: troff fonts with me macros Keywords: simple solution Date: 14 Mar 90 14:51:56 GMT Sender: News <news@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: > >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and >'.sz 12' at the top of my file with no luck. The only way those > .............etc. >Al Gaspar <gaspar@stl-08sima.army.mil> >USAMC SIMA, ATTN: AMXSI-TTC, Box 1578, St. Louis, MO 63188-1578 >COMMERCIAL: (314) 263-5646 AUTOVON: 693-5646 >uunet.uu.net!stl-08sima.army.mil!gaspar =-=-=-=-=-=-= Try putting the statement ".nr PS 12" at the very beginning of your program. You may need to include "gsize 12" in your .EQN definitions if you're using eqn. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- John E. Prussing Internet: jep@uxh.cso.uiuc.edu Aeronautical & Astronautical Engineering University of Illinois at Urbana-Champaign Bitnet: jep@uiucuxh ----------------------------- From: Anton Hartl <hartl@lan.informatik.tu-muenchen.dbp.de> Subject: Re: troff fonts with me macros Date: 14 Mar 90 16:27:54 GMT Sender: news@lan.informatik.tu-muenchen.dbp.de To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and >'.sz 12' at the top of my file with no luck. The only way those >insertions seem to work is to place them in each paragraph separately. That's true, .sz does a temporary size change, respectively every call to .pp or similar macros resets the point size. >The only way I have been able to change the point size for the entire >document was to make my own copy of the macro package and change the >defaults for the .tp and .pp registers. Is there a better way? There is. The number register pp defines the pointsize used throughout the entire document; the macros pp, lp and the like set the pointsize to the value of that number register. So the first thing you put in Your paper is '.nr pp 12' and everything should work fine. -Toni Anton Hartl | hartl@lan.informatik.tu-muenchen.dbp.de, ...!unido!tumult!hartl Only those who attempt the absurd will achieve the impossible. -Escher ----------------------------- From: Lyle Seaman <lws@comm.wang.com> Subject: Re: Printer accounting and cutoff from UNIX: is it possible? Date: 14 Mar 90 00:35:08 GMT To: info-unix@sem.brl.mil Gee, all we did was put a cup on the printer and a sign that said: Laser Printer costs $0.07/page. Your own paper --> $0.05/page Worked pretty well. -- Lyle sendmail.cf under construction, pardon the From: lws@comm.wang.com (or, uunet!comm.wang.com!lws) (508) 967-2322 ----------------------------- From: Ravindran Ramachandran <rr@csuna.cs.uh.edu> Subject: Re: signal problems on BSD Date: 14 Mar 90 04:58:14 GMT Sender: nntppost@uhnix1.uh.edu To: info-unix@sem.brl.mil In article <1990Mar8.084830.9252@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: >In article <5913@star.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: >> )doesn't happen in csh. Therefore, the reason your process is not >> )getting the signal is because the signal is never sent. >> >> ...because csh puts each job into its own process group and a the group of a >> background job never equals the tty process group (by definition!). > I had a similar kind of a problem on a Pyramid running ATT Sys 5, having csh as the base shell. I have a Bourne shell script that is started up from my .login, which runs a clock at the top corner of my tty. When I log out, however, the process remains active even though there is no actual device to output to. I tried in the script to 'trap' the signals, but they are not received on logout. The suggestion to: a) set setpgrp() is slightly a pain in a shell script. b) modify /bin/login (?) is impossible for me. Right now, in my .logout I do a ps, and use awk to get the pid so that I can explicitly kill the process. However, I wish the script would directly get the signal when I logout and expire! For your eyes only (please destroy after reading), --Ravi- ----------------------------- From: Sebastian Hammer <quinn@diku.dk> Subject: Intro to sockets? Date: 14 Mar 90 14:24:07 GMT To: info-unix@sem.brl.mil I've checked the list of common questions, and haven't seen this one, so I guess it is legal.. :) Is there some sort of description of/introduction to the socket-concept available (either on a file somewhere, or on paper)?? I've tried to get by on the man pages, but either I'm not looking the right places, or the info there is a bit thin (The man pages, I think, are generally most useful if you know the material beforehand). I'd be grateful for any references. quinn@freja.diku.dk (The Novice) ----------------------------- From: Robert Halloran <rkh@mtune.att.com> Subject: Re: Kermit vs uugetty Date: 14 Mar 90 14:26:42 GMT To: info-unix@sem.brl.mil In article <1990Mar12.174721.13244@tcsc3b2.tcsc.com> pag@tcsc3b2.tcsc.com (Philip A. Gross) writes: >kdq@demott.COM (Kevin D. Quitt) writes: >> We have a modem on /dev/tty01 with a uugetty running on it for >>normal network use. Occasionally, I would like to be able to use this >>modem to call other systems (such as bbs's) and transfer files (we don't >>have ftp capability). I have kermit to do the transfers, but it seems >>to butt heads with the uugetty in trying to get the incoming data - > >Well, I am going to guess that you might be using Un*x SVR3.2 or >thereabouts. HoneyDanBer uucp uses the directory /usr/spool/locks >to keep lock files regarding what devices are in use, etc. The current versions of Unix kermit have a make for 'att3bx', which is used to get the right directory for setting up lockfiles. Bob Halloran ========================================================================= UUCP: att!mtune!rkh Internet: rkh@mtune.ATT.COM Disclaimer: If you think AT&T would have ME as a spokesman, you're crazed. Quote: "Remember, kids, if some weirdo in a blue suit offers you some DOS, JUST SAY NO!!!" ----------------------------- From: Michael Furtney <mfurtney@dahlia.waterloo.edu> Subject: BSD4.3 For Banking Date: 14 Mar 90 19:05:15 GMT Sender: daemon@watdragon.waterloo.edu To: info-unix@sem.brl.mil Hello, I currently work part time for a relatively small software development company called XCEL-Soft. We are based in Toronto, and our major product is a retail banking system that runs on a UNIX System V platform. Right now, we are in the midst of designing an 'Inter-Branch Banking' facility, and we are planning to make use of a Public Data Network (X25) to facilitate communications between branches. The software has been developed by us, for this project, and is now being tested on a local network. While this poses no problems from our point of view, it is felt by one of our major customers (A bank based in Jamaica), and by my employer, that a private network would be more secure, and offer better response times. We are looking at a solution of porting our retail banking system to BSD, and perhaps implementing a TCP/IP network of some kind that would facilitate inter-branch communication. We have various other reasons for switching to BSD, eg. the socket is a more robust IPC mechanism than is the standard System V IPC Message Queue routines, and our banking software relies heavily on this. But this article is not concerned with that... We are experienced with X25, and interfacing our banking software to other networks. (VISA/NET in particular) . This leaves us with a few questions, that I am sure many of the knowledgable gurus out there could answer for us : 1) Were could we write, or call, or FTP to obtain information concerning a) The purchase of 4.3BSD. b) Implementing a TCP/IP based network. In Particular: What types of communications medium are supported by TCP/IP. (With our PDN solution, each branch has a leased line to the network, is that possible with a TCP/IP solution?) These are broad, and rather vague questions, but any responses would be appreciated. All responses should be directed to : mfurtney@dahlia.waterloo.edu ..!watmath!watcgl!electro!grimm!mike (At home) ------------------------------------------------------------------------------- ..!watmath!looking!grimm!mike ..!watmath!watcgl!electro!grimm!mike ----------------------------- From: Mehdi Bonyadi <mehdi@venus.sandiego.ncr.com> Subject: interprocess communication Date: 14 Mar 90 19:11:34 GMT Sender: news@iss-rb.sandiego.ncr.com To: info-unix@sem.brl.mil Hi everybody, I wrote a program that deals with connectivity information of a logic design. I took the connectivity information from a CAD tools set output. What I want to do is to see if it is possible to "kind of" integrate the schematic capture part of the CAD tool into my program. I do not have the sources for the CAD system, it is a commercial tool. My program can find some characteristics of the logic design. For some of its functions it needs some input from the user, ie name of a part or name of a signal. Currently, the user must type these names in, but what I am thinking of doing is to monitor the schematic capture process from outside, ie my program, and read the input of the user and the response of the schematic capture program. This way the user can just use the mouse and pick a signal on the schematic and ask for the information on that signal from the schematic capture program, the response would be few lines of text giving the info about the signal. This information goes to a tty subwindow of the schematic capture frame. And I want to read this text. I was told that I can look at the /dev/kmem and monitor the clist of that tty window and go from there. I was wondering about some of the complications that I am putting myself into if I go through this path. For one not everybody has read permission to /dev/kmem, or how do I find the clist for this tty subwindow, or if I am violating copyright if I look at the /dev/kmem and monitor the clist. By the way if anyone had done such a thing before, I would appreciate if I could take a look at the program. I am open to any other suggestions that might be applicable to this problem. --------------------------------------------------------------------------- Mehdi Bonyadi, NCR Corporation, E & M San Diego - Mail Stop 4424 16550 West Bernardo Drive San Diego, CA 92127 (619) 485-2233 mehdi@venus.SanDiego.NCR.COM ----------------------------- From: mark kraitchman <mark@isis.berkeley.edu> Subject: cache parity error Date: 14 Mar 90 22:11:10 GMT Sender: news@pasteur.berkeley.edu To: info-unix@sem.brl.mil Hi, I realize this is hardware related, since DEC's response was to replace the CPU. My question is, what is a cache parity error? Thanks in Advance, mark [where does the time go] kraitchman * UUCP:ucbvax!isis!mark * * ARPA:mark@isis.berkeley.edu * ----------------------------- From: Mark Benard <mb@rex.cs.tulane.edu> Subject: Re: RPC programming Date: 14 Mar 90 23:57:50 GMT To: info-unix@sem.brl.mil In article <3744@incas.informatik.uni-kl.de> zessel@descartes.informatik.uni-kl.de (Holger Zessel) writes: >tph@cs.utexas.edu (Pow-Hwee Tan) writes: >>2. The XDR serializing/deserializing routines do not explicitly free >>the memory allocated. How can I free them myself? > >This would interest me too. I write some kind of NFS-Server. Now >I have the problem that ist prototypes are growing permanently while >serving NFS-requests. I could not find any reason for this memory leak >in my code. Won't xdr_free() do the job? Mark -- Mark Benard Department of Computer Science INTERNET & BITNET: mb@cs.tulane.edu Tulane University USENET: rex!mb New Orleans, LA 70118 ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (03/19/90)
----Reason for mail failure follows---- Sending mail to <math!ckaul@cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 15 Mar 90 07:08:00 MST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V9#092 To: "math!ckaul" <math!ckaul@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Thu, 15 Mar 90 06:49:28 MST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab06497; 15 Mar 90 6:01 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa06485; 15 Mar 90 5:45 EST Date: Thu, 15 Mar 90 05:45:28 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V9#092 Message-ID: <9003150545.aa06485@SEM.BRL.MIL> INFO-UNIX Digest Thu, 15 Mar 1990 V9#092 Today's Topics: fcntl Re: fcntl Re: *nix - an abbreviation? Re: Motif shared library? Starting a session at a terminal remotely ftp site for uuencode/decode source in PD Re: troff fonts with me macros Re: Printer accounting and cutoff from UNIX: is it possible? Re: signal problems on BSD Intro to sockets? Re: Kermit vs uugetty BSD4.3 For Banking interprocess communication cache parity error Re: RPC programming ----------------------------------------------------------------- From: Jerome Freedman <freedman@granite.cr.bull.com> Subject: fcntl Date: 13 Mar 90 12:57:55 GMT To: info-unix@sem.brl.mil I know what the entry point(s) to ioctl are (I've seen enough drivers but where are the fcntl entry points? There is sort of an overlap there. Will a fcntl cause a call to dev_ioctl? Jerry Freedman,Jr ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: fcntl Date: 15 Mar 90 00:18:39 GMT To: info-unix@sem.brl.mil In article <1990Mar13.125755.9720@granite.cr.bull.com> freedman@granite.cr.bull.com (Jerome Freedman) writes: > I know what the entry point(s) to ioctl are (I've seen >enough drivers but where are the fcntl entry points? >There is sort of an overlap there. Will a fcntl cause >a call to dev_ioctl? Well, it's not supposed to -- fcntl() was introduced specifically to play with the file table entries, which is something the device driver is not supposed to know (or care) about. ----------------------------- From: Roger Gonzalez <rg@uunet!unhd> Subject: Re: *nix - an abbreviation? Keywords: sorry; some misunderstandings :-( Date: 13 Mar 90 13:46:02 GMT To: info-unix@sem.brl.mil Yep, as you said A/UX and others don't fit the *IX. For that matter, one of our systems runs UNOS, which is a UN* :-) -- UUCP: ..!uunet!unhd!rg | USPS: Marine Systems Engineering Laboratory BITNET: r_gonzalez at unhh | University of New Hampshire PHONE: (603) 862-4600 | Marine Programs Building FAX: (603) 862-4399 | Durham, NH 03824-3525 ----------------------------- From: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> Subject: Re: *nix - an abbreviation? Keywords: sorry; some misunderstandings :-( Date: 14 Mar 90 22:19:17 GMT To: info-unix@sem.brl.mil In article <1990Mar13.134602.12921@uunet!unhd> rg@unhd.unh.edu.UUCP (Roger Gonzalez ) writes: : Yep, as you said A/UX and others don't fit the *IX. For that matter, : one of our systems runs UNOS, which is a UN* :-) How 'bout we switch to normal regular expressions and say something like: (u.*[nx]|[rn].*x|ix) That gets most of 'em, and maybe a few that haven't been invented yet. Or perhaps (^u|[ux]$) Or maybe that should that be (^u|[ux]$|osf) Probably get a false positive with that one, though. :-) Larry Wall lwall@jpl-devvax.jpl.nasa.gov ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Motif shared library? Date: 13 Mar 90 19:34:24 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil >The .sa file may have to contain code, if the address of a function is >referenced by both library code and library client code (e.g. mem_rop in >the pixrect library). Yup, I'd forgotten that little Tale of Terror from 4.0 development days. If you have to do something like if (foo->bar->bletch == mem_rop) { /* * Do special memory pixrect stuff */ } else { /* * Do other pixrect stuff */ } this comes into play (i.e., it's not *any* reference by name that causes problems, it's references that actually care about the address of the function as something other than the target of a jump). ----------------------------- From: dec@winston.sr.com Subject: Starting a session at a terminal remotely Date: 13 Mar 90 21:27:16 GMT To: info-unix@sem.brl.mil I have to start a session programaticly on a terminal, the terminal is local to my machine, but for reasons that make no difference I am forced to start the session for them. (meaning that instead of letting someone log into a script or anything else, the data entry screen has to be there for them). Unfortunately I can not make the data entry program open the dev I want to use because it is an existing package. I am running SCO XENIX on everex 286 systems, version 2.2.3. Please help me! Thanks in advance Dave David Compton, 900 W. Alameda, Burbank, CA, 91506 U.S.A, Work Phone 818-843-7311 UUCP: ..!winston!dec INTERNET: dec@winston.sr.com Home Phone 805-583-4345 ----------------------------- From: "David J. Harr" <hammersslammers1@oxy.edu> Subject: ftp site for uuencode/decode source in PD Date: 13 Mar 90 21:40:33 GMT To: info-unix@sem.brl.mil Does anyone know where I can find the source for uuencode/uudecode? I have these huge files that I encoded on a Sun before mailing them to myself on a Prime, but I get here and I find that Primix, the Prime implementation of Unix, does not include these utilities in its standard distribution. As a result, I am stuck here with > 50 megabytes of stuff and no way to use it. Any help would be appreciated. Please e-mail me as I do not really follow this newsgroup regularly. Thank you. David ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: troff fonts with me macros Date: 14 Mar 90 00:35:04 GMT To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and I had to do this with my USENET Manual Set and came up with the following: .nr pp 8 .nr sp 8 .nr tp 8 to set it to 8 point. I added these lines after the .so for the me macros. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: "John E. Prussing" <jep@uxh.cso.uiuc.edu> Subject: Re: troff fonts with me macros Keywords: simple solution Date: 14 Mar 90 14:51:56 GMT Sender: News <news@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: > >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and >'.sz 12' at the top of my file with no luck. The only way those > .............etc. >Al Gaspar <gaspar@stl-08sima.army.mil> >USAMC SIMA, ATTN: AMXSI-TTC, Box 1578, St. Louis, MO 63188-1578 >COMMERCIAL: (314) 263-5646 AUTOVON: 693-5646 >uunet.uu.net!stl-08sima.army.mil!gaspar =-=-=-=-=-=-= Try putting the statement ".nr PS 12" at the very beginning of your program. You may need to include "gsize 12" in your .EQN definitions if you're using eqn. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- John E. Prussing Internet: jep@uxh.cso.uiuc.edu Aeronautical & Astronautical Engineering University of Illinois at Urbana-Champaign Bitnet: jep@uiucuxh ----------------------------- From: Anton Hartl <hartl@lan.informatik.tu-muenchen.dbp.de> Subject: Re: troff fonts with me macros Date: 14 Mar 90 16:27:54 GMT Sender: news@lan.informatik.tu-muenchen.dbp.de To: info-unix@sem.brl.mil In article <22738@adm.BRL.MIL> gaspar@stl-08sima.army.mil (Al Gaspar) writes: >I am working on a document using the me macros and I want to >change the point size for the entire document from the default >of 10 to 12. I have tried (among other things) '.ps 12' and >'.sz 12' at the top of my file with no luck. The only way those >insertions seem to work is to place them in each paragraph separately. That's true, .sz does a temporary size change, respectively every call to .pp or similar macros resets the point size. >The only way I have been able to change the point size for the entire >document was to make my own copy of the macro package and change the >defaults for the .tp and .pp registers. Is there a better way? There is. The number register pp defines the pointsize used throughout the entire document; the macros pp, lp and the like set the pointsize to the value of that number register. So the first thing you put in Your paper is '.nr pp 12' and everything should work fine. -Toni Anton Hartl | hartl@lan.informatik.tu-muenchen.dbp.de, ...!unido!tumult!hartl Only those who attempt the absurd will achieve the impossible. -Escher ----------------------------- From: Lyle Seaman <lws@comm.wang.com> Subject: Re: Printer accounting and cutoff from UNIX: is it possible? Date: 14 Mar 90 00:35:08 GMT To: info-unix@sem.brl.mil Gee, all we did was put a cup on the printer and a sign that said: Laser Printer costs $0.07/page. Your own paper --> $0.05/page Worked pretty well. -- Lyle sendmail.cf under construction, pardon the From: lws@comm.wang.com (or, uunet!comm.wang.com!lws) (508) 967-2322 ----------------------------- From: Ravindran Ramachandran <rr@csuna.cs.uh.edu> Subject: Re: signal problems on BSD Date: 14 Mar 90 04:58:14 GMT Sender: nntppost@uhnix1.uh.edu To: info-unix@sem.brl.mil In article <1990Mar8.084830.9252@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: >In article <5913@star.cs.vu.nl>, maart@cs.vu.nl (Maarten Litmaath) writes: >> )doesn't happen in csh. Therefore, the reason your process is not >> )getting the signal is because the signal is never sent. >> >> ...because csh puts each job into its own process group and a the group of a >> background job never equals the tty process group (by definition!). > I had a similar kind of a problem on a Pyramid running ATT Sys 5, having csh as the base shell. I have a Bourne shell script that is started up from my .login, which runs a clock at the top corner of my tty. When I log out, however, the process remains active even though there is no actual device to output to. I tried in the script to 'trap' the signals, but they are not received on logout. The suggestion to: a) set setpgrp() is slightly a pain in a shell script. b) modify /bin/login (?) is impossible for me. Right now, in my .logout I do a ps, and use awk to get the pid so that I can explicitly kill the process. However, I wish the script would directly get the signal when I logout and expire! For your eyes only (please destroy after reading), --Ravi- ----------------------------- From: Sebastian Hammer <quinn@diku.dk> Subject: Intro to sockets? Date: 14 Mar 90 14:24:07 GMT To: info-unix@sem.brl.mil I've checked the list of common questions, and haven't seen this one, so I guess it is legal.. :) Is there some sort of description of/introduction to the socket-concept available (either on a file somewhere, or on paper)?? I've tried to get by on the man pages, but either I'm not looking the right places, or the info there is a bit thin (The man pages, I think, are generally most useful if you know the material beforehand). I'd be grateful for any references. quinn@freja.diku.dk (The Novice) ----------------------------- From: Robert Halloran <rkh@mtune.att.com> Subject: Re: Kermit vs uugetty Date: 14 Mar 90 14:26:42 GMT To: info-unix@sem.brl.mil In article <1990Mar12.174721.13244@tcsc3b2.tcsc.com> pag@tcsc3b2.tcsc.com (Philip A. Gross) writes: >kdq@demott.COM (Kevin D. Quitt) writes: >> We have a modem on /dev/tty01 with a uugetty running on it for >>normal network use. Occasionally, I would like to be able to use this >>modem to call other systems (such as bbs's) and transfer files (we don't >>have ftp capability). I have kermit to do the transfers, but it seems >>to butt heads with the uugetty in trying to get the incoming data - > >Well, I am going to guess that you might be using Un*x SVR3.2 or >thereabouts. HoneyDanBer uucp uses the directory /usr/spool/locks >to keep lock files regarding what devices are in use, etc. The current versions of Unix kermit have a make for 'att3bx', which is used to get the right directory for setting up lockfiles. Bob Halloran ========================================================================= UUCP: att!mtune!rkh Internet: rkh@mtune.ATT.COM Disclaimer: If you think AT&T would have ME as a spokesman, you're crazed. Quote: "Remember, kids, if some weirdo in a blue suit offers you some DOS, JUST SAY NO!!!" ----------------------------- From: Michael Furtney <mfurtney@dahlia.waterloo.edu> Subject: BSD4.3 For Banking Date: 14 Mar 90 19:05:15 GMT Sender: daemon@watdragon.waterloo.edu To: info-unix@sem.brl.mil Hello, I currently work part time for a relatively small software development company called XCEL-Soft. We are based in Toronto, and our major product is a retail banking system that runs on a UNIX System V platform. Right now, we are in the midst of designing an 'Inter-Branch Banking' facility, and we are planning to make use of a Public Data Network (X25) to facilitate communications between branches. The software has been developed by us, for this project, and is now being tested on a local network. While this poses no problems from our point of view, it is felt by one of our major customers (A bank based in Jamaica), and by my employer, that a private network would be more secure, and offer better response times. We are looking at a solution of porting our retail banking system to BSD, and perhaps implementing a TCP/IP network of some kind that would facilitate inter-branch communication. We have various other reasons for switching to BSD, eg. the socket is a more robust IPC mechanism than is the standard System V IPC Message Queue routines, and our banking software relies heavily on this. But this article is not concerned with that... We are experienced with X25, and interfacing our banking software to other networks. (VISA/NET in particular) . This leaves us with a few questions, that I am sure many of the knowledgable gurus out there could answer for us : 1) Were could we write, or call, or FTP to obtain information concerning a) The purchase of 4.3BSD. b) Implementing a TCP/IP based network. In Particular: What types of communications medium are supported by TCP/IP. (With our PDN solution, each branch has a leased line to the network, is that possible with a TCP/IP solution?) These are broad, and rather vague questions, but any responses would be appreciated. All responses should be directed to : mfurtney@dahlia.waterloo.edu ..!watmath!watcgl!electro!grimm!mike (At home) ------------------------------------------------------------------------------- ..!watmath!looking!grimm!mike ..!watmath!watcgl!electro!grimm!mike ----------------------------- From: Mehdi Bonyadi <mehdi@venus.sandiego.ncr.com> Subject: interprocess communication Date: 14 Mar 90 19:11:34 GMT Sender: news@iss-rb.sandiego.ncr.com To: info-unix@sem.brl.mil Hi everybody, I wrote a program that deals with connectivity information of a logic design. I took the connectivity information from a CAD tools set output. What I want to do is to see if it is possible to "kind of" integrate the schematic capture part of the CAD tool into my program. I do not have the sources for the CAD system, it is a commercial tool. My program can find some characteristics of the logic design. For some of its functions it needs some input from the user, ie name of a part or name of a signal. Currently, the user must type these names in, but what I am thinking of doing is to monitor the schematic capture process from outside, ie my program, and read the input of the user and the response of the schematic capture program. This way the user can just use the mouse and pick a signal on the schematic and ask for the information on that signal from the schematic capture program, the response would be few lines of text giving the info about the signal. This information goes to a tty subwindow of the schematic capture frame. And I want to read this text. I was told that I can look at the /dev/kmem and monitor the clist of that tty window and go from there. I was wondering about some of the complications that I am putting myself into if I go through this path. For one not everybody has read permission to /dev/kmem, or how do I find the clist for this tty subwindow, or if I am violating copyright if I look at the /dev/kmem and monitor the clist. By the way if anyone had done such a thing before, I would appreciate if I could take a look at the program. I am open to any other suggestions that might be applicable to this problem. --------------------------------------------------------------------------- Mehdi Bonyadi, NCR Corporation, E & M San Diego - Mail Stop 4424 16550 West Bernardo Drive San Diego, CA 92127 (619) 485-2233 mehdi@venus.SanDiego.NCR.COM ----------------------------- From: mark kraitchman <mark@isis.berkeley.edu> Subject: cache parity error Date: 14 Mar 90 22:11:10 GMT Sender: news@pasteur.berkeley.edu To: info-unix@sem.brl.mil Hi, I realize this is hardware related, since DEC's response was to replace the CPU. My question is, what is a cache parity error? Thanks in Advance, mark [where does the time go] kraitchman * UUCP:ucbvax!isis!mark * * ARPA:mark@isis.berkeley.edu * ----------------------------- From: Mark Benard <mb@rex.cs.tulane.edu> Subject: Re: RPC programming Date: 14 Mar 90 23:57:50 GMT To: info-unix@sem.brl.mil In article <3744@incas.informatik.uni-kl.de> zessel@descartes.informatik.uni-kl.de (Holger Zessel) writes: >tph@cs.utexas.edu (Pow-Hwee Tan) writes: >>2. The XDR serializing/deserializing routines do not explicitly free >>the memory allocated. How can I free them myself? > >This would interest me too. I write some kind of NFS-Server. Now >I have the problem that ist prototypes are growing permanently while >serving NFS-requests. I could not find any reason for this memory leak >in my code. Won't xdr_free() do the job? Mark -- Mark Benard Department of Computer Science INTERNET & BITNET: mb@cs.tulane.edu Tulane University USENET: rex!mb New Orleans, LA 70118 ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (03/29/90)
----Reason for mail failure follows---- Sending mail to host ceratiidae.cs.sandia.gov : Fatal reply code to command 'RCPT TO:<jnjortn@ceratiidae.cs.sandia.gov>': 554 /home/u/jnjortn/.forward: line 1: jnjortn@chaos... Never heard of chaos in domain cs . sandia . gov ----Transcript of message follows---- Date: 28 Mar 90 09:33:00 MST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V9#104 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Wed, 28 Mar 90 08:41:22 MST Received: from SEM.BRL.MIL by SEM.brl.MIL id ab06484; 28 Mar 90 5:58 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa06480; 28 Mar 90 5:46 EST Date: Wed, 28 Mar 90 05:45:42 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V9#104 Message-ID: <9003280546.aa06480@SEM.BRL.MIL> INFO-UNIX Digest Wed, 28 Mar 1990 V9#104 Today's Topics: Setting up slip Displaying 8-bit characters in vi... UNIX front end for DOS -- remote! pipe() doesn't seem to work. (Pyramid OSx 4.4) (Summary) Re: Awk-compiler LU6.2 wanted for 386 system Re: Default switches for lp? C-Shell/rusers problem Allowing users to remove files in /usr/spool/at Re: How can I get the Frequently Asked Questions? Re: AT&T source license Re: Programmers Prefer 8.5 x 11 PC/IX Archive Question Re: Archive to tape software Re: 4.3 System Administration Training Courses Re: RCS: how do you freeze a configuration? Problems with diff -e and ed? Re: ANSI header files Re: How to set TERM for Televideo? ``Office Automation'' under Unix? Re: File server security gas Re: termcap or terminfo? Availability of Korn Shell ----------------------------------------------------------------- From: Nick Sayer <mrapple@quack.uucp> Subject: Setting up slip Keywords: Sun 2/170 & 3/?? Date: 26 Mar 90 07:49:49 GMT To: info-unix@sem.brl.mil I have a Sun 2/170 and have recently gotten slipware for it. At school we have a couple sun3s and a vax on an ethernet, and will soon be hooked up to the internet (via a slip link from the vax, but that's not important). The sun 2 is quack, and the sun 3 I have been trying to connect to is uop. quack is 138.9.100.1, and uop is 138.9.200.1 (quack's address is arbitrary - in future it may need to be changed to something totally different for various reasons). Using a 2-3/3-2 cable and two serial ports on quack, I have gotten telnet to talk to itself using the instructions in the slip 4.0 README, thus: quack% sliplogin 138.9.100.10 138.9.100.11 > /dev/tty03 < /dev/tty03 & quack% sliplogin 138.9.100.11 138.9.100.10 > /dev/tty04 < /dev/tty04 & quack% ping 138.9.100.10 138.9.100.10 is alive ... etc slip has been used in the past at uop, so I did not perform a loopback test there. I am trying to hook the two machines up via slip on a non-permanent basis. I.e. If I want to do some ftping from the internet (when they get it up), it's seemingly more convenient to "slip" into uop, then ftp directly into quack (over the phone) than to ftp to uop, then kermit to quack, or some such nonesense. I am familiar with unix, but just starting TCP/IP. I plan to hook quack up to Amateur Packet Radio TCP/IP, but that's going more slowly. I have tried this: uop% sliplogin 138.9.100.4 138.9.200.4 255.255.255.0 ~Clocal command: sliplogin 138.9.200.4 138.9.100.4 255.255.255.0 If I try to ping ..200.4, the packets go out, but they never come back. I'm obviously a confused soul. The manuals I have read have explained the theory of TCP/IP, and I understand things, but how these things are implemented, and how to make them work is obviously more difficult than theorizing about them. Thanks in advance if anyone can help me out. ----------------------------- From: Paul Gillingwater <paul@actrix.co.nz> Subject: Displaying 8-bit characters in vi... Date: 26 Mar 90 10:21:25 GMT To: info-unix@sem.brl.mil Hi there, I've got ISC 386/ix 2.02, and have been using vi with some files that contain extended characters (8th bit set). These appear on vi as e.g. \272. How can I force vi to use the extended characters? Can I have a snappy answer to this one please, i.e. same day, as I have to show this to a customer tomorrow morning! Note my local time is GMT-12 hrs (New Zealand). -- Paul Gillingwater, paul@actrix.co.nz ----------------------------- From: Paul Gillingwater <paul@actrix.co.nz> Subject: UNIX front end for DOS -- remote! Date: 26 Mar 90 10:45:14 GMT To: info-unix@sem.brl.mil I've been planning a program to hone my skills using my new Zortech C++ 2.0 compiler (MS-DOS). I use UNIX quite a lot, but mostly from remote modems, and usually with terminal emulators on PC's. I also run a public access UNIX system, and was thinking of ways to add value for my user base, when I thought of the following idea for a program... Hit 'n' now if dreams bore you... My program would run on an MS-DOS machine, as well as OS/2. It may also be ported to UNIX, although this is less likely. Amiga DOS is another possibility, depending upon compilers. It would use lots of C++ features -- the best way to learn is by doing, in my experience. Extensive use will be made of windows and color, in a way that tries to assist rather than obscure. Essentially, the program will insulate the novice user from a UNIX shell running on a remote machine. The connection can be made via a comms package such as Procomm Plus, Kermit or Telix, and then the user can shell out to run my front end. A windowing environment would then be available, which would use simple WIMPS to provide much of the interactive shell functionality. One window would show the UNIX commands which are then generated and sent to the remote system to achieve the objective. A history of these commands will be maintained, which can be edited and executed at will, thus adding command history even to older Bourne shells. A secondary benefit is that the user would see the commands forming as they go, thus learning UNIX syntax. When started, the shell (running under DOS) would try to learn what it can about the UNIX environment which the user is connected to. If not on-line, a simple dialling directory and login script can be executed. Useful information would be requested from the remote system, such as pwd, id, logname, $HOME, $SHELL, $EDITOR, date, ls *, files *, etc. This would be used to build a friendly front end, with files sorted into functional groups, e.g. shells scripts, data, binaries, etc. The F1 key would provide help at all times. In particular, it will be highly contextual, although keyword indexing of the help information will be supported. In addition, it will recognise events, e.g. if another user executes a 'write' to the user's screen, the shell will pick this up, and notify the user. Because many events will run asynchronously, (e.g. notification of job completion for background jobs, chat requests, mail notification, etc.) the shell will continuously monitor streams of output from the UNIX host, looking for keywords (of course this is configurable via macros, allowing the advanced user to modify the behaviour). The stty command will be well emulated, e.g. for things like baud rate, parity, echoing, interrupt and other signals, etc. A later version will support shell layers, by using windows (locally). File transfer will be supported (Kermit, [XYZ]modem), using such excellent products as DSZ and rzsz to implement them. ASCII file transfers will be supported too, a la cu. ----------------------- I have lots more ideas, and have started planning the screens, as well as the objects for representing the data. What i'd like to do is start some dialogue -- maybe these ideas have already been developed, so i don't want to re-invent the wheel. In case this is new work, I hereby Copright 1990 this message. You may comment on it, but don't rip off the ideas and sell them as your own. Copyright (C) 1990 -- Paul Gillingwater -- Paul Gillingwater, paul@actrix.co.nz ----------------------------- From: "A.V. Raman" <ARaman@massey.ac.nz> Subject: pipe() doesn't seem to work. (Pyramid OSx 4.4) (Summary) Date: 26 Mar 90 23:41:47 GMT To: info-unix@sem.brl.mil For the sake of other readers who may be interested, I'm restating the problem here and posting a summary of the replies I received. ---- Faulty Code begins ---- #include <stdio.h> setup() { int fd[2]; if (pipe(fd) < 0) { /* write to fd[1] and read fd[0] */ perror("pipe"); exit(1); } if (fork() == 0) { /* set up child to read pipe as stdin */ close(0); dup(fd[0]); close(fd[1]); execl("/bin/cat","cat","-n",NULL); /* ucb cat -n to number lines */ perror("exec"); } else { /* set up parent to write to pipe as stdout */ /**/ printf (" "); /* program fails if this line is removed */ close(1); dup(fd[1]); close(fd[0]); } } main(argc,argv) char **argv; { FILE *fp; char buf [BUFSIZ]; if (argc == 1) exit(1); setup(); /* setup pipe with cat reading other end */ if ((fp = fopen(argv[1],"r")) == NULL) { perror(argv[1]); exit(1); } while (fgets(buf,BUFSIZ,fp) != NULL) printf("%s", buf); /* write into pipe */ fclose(fp); close(1); return 0; } ---- Code ends ---- Thanks for all the prompt solutions that I received for the problem. The fault in my program narrows down to my mixing buffered and unbuffered IO incorrectly. Reproduced with the permission of Cuong T. Nguyen of Center for Integrated Systems, Stanford University: >The problem is with stdio buffering, which can be none, line, >or block. When the program is started, stdio is typically fully >(block) buffered. When your first printf() is called (actually, >_flsbuf()), IF stdout is a tty, buffering is set to line. Otherwise >it is left alone. That's why the null print(" ") insertion helps, >and also why write() doesn't, since it is not part of stdio. > >When your printf's are fully buffered, anything left unflushed >in stdout before the pipes close is lost. The simplest thing >to do is an fflush(stdout) at the end. Else you can do something >a la setlinebuf() to force the buffering type you like. - Anand ----------------------------- From: Jim Harkins <jharkins@sagpd1.uucp> Subject: Re: Awk-compiler Date: 27 Mar 90 02:08:24 GMT To: info-unix@sem.brl.mil In article <338774@neabbs.UUCP> aerts@neabbs.UUCP (AD AERTS) writes: > >Has anyone ever seen an AWK-compiler? AWK-to-C would be fine too. Mail bounced so... Look into the document "A supplemental document for awk" subtitled "things Al, Pete, and Brian didn't mention much". I snarfed it off the net a few years ago and it's probably archived somewhere. Anyway, it says -- begin direct quoting -- 2.5 Script "Compilation" [It is likely that this does not work at most sites. If it does not, the following will probably not be of interest to the casual user.] The command awk -S -f script.awk produces a file named awk.out. This is a core image of awk after parsing the file script.awk. The command awk -Rawk.out datafile causes awk.out to be applied to datafile (or the standard input if no file is given). Unfortunately, the way this is implemented requires some special action on the part of the person installing awk. -- end quoting -- It's a good document, and I suspect I'm going to get bazillions of requests to post it :-) -- jim jharkins@sagpd1 We are all aware of the high cost of alcohol abuse. To help solve this problem take this signature to your local liquor store for $1.00 off your next purchase. ----------------------------- From: Paul Gillingwater <paul@actrix.co.nz> Subject: LU6.2 wanted for 386 system Date: 27 Mar 90 02:59:46 GMT To: info-unix@sem.brl.mil Hi there, I work for HP in New Zealand. We're offering a deal to a customer that wishes to buy 14 UNIX boxes (386 and 486). They have a choice between SCO Xenix, SCO UNIX and ISC 386/ix 2.02. The customer wants to connect to their IBM mainframe, which requires LU 6.2 for SNA using SDLC. They wish to be able to operate a number of host sessions as well from the UNIX, via 3270 emulation, as well as running RDBMS applications that use an API to access remote data on the mainframe. I know that there is a proprietary HP solution that runs under HP/UX, however this customer wants to go with 386 boxes. Does anyone know of an LU 6.2 API solution for 386/486 UNIX? Please e-mail and I will summarise. -- Paul Gillingwater, paul@actrix.co.nz ----------------------------- From: Terry Lyons <terry@pride386.uucp> Subject: Re: Default switches for lp? Date: 27 Mar 90 07:31:53 GMT To: info-unix@sem.brl.mil In article <113@dynasys.UUCP>, jessea@dynasys.UUCP (Jesse W. Asher) writes: > I'm tired of > typing in -onobanner everytime I want to print something because I > don't want banner pages. I don't need them. So, is there a way > to set something that it will not do this by default (both system > and/or user)? look for /etc/default/lp or whatever looks close on your system then change banners=1 to 0 or edit the lp/interface/(printername) file and force banners to be 0 OR make sure your PATH looks at $home/bin first and put something like this in your bin: 1. make an executable file named lp 2. put the commands in that your tired of typing e.g.: /bin/lp -obanners -ocompressed -dlazer and away you go... -- ************************************************************************** * UUNET ...!pride386!terry * FAX (714) 739 - 2203 * * Pern is a dragons best freind * ************************************************************************** ----------------------------- From: "-----> Dave" <komatsu@alcor.usc.edu> Subject: C-Shell/rusers problem Date: 27 Mar 90 08:12:20 GMT Sender: news@chaph.usc.edu To: info-unix@sem.brl.mil This should be a fairly simple syntactical question. I am writing a C-Shell and I want to find a user and keep searching off and on until I find that person. --- # C-shell program while (`rusers alcor | grep -w $1`) echo $1 sleep 100 end echo "User has logged in" --- Usage is: find user and this should hunt the system alcor but somehow it doesn't work any ideas. --------------------- komatsu@alcor.usc.edu --------------------- ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Allowing users to remove files in /usr/spool/at Date: 27 Mar 90 11:10:20 GMT To: info-unix@sem.brl.mil I work on a Sequent Symmetry S81 running DYNIX 3.0.15. My question could, however, apply to any UN*X box. I recently set up a command (atq) which lists, in a `friendly' format, the jobs waiting in /usr/spool/at (i.e. files produced by the "at" command). I would like to expand the command to enable users to cancel their own jobs - i.e. remove their own files in /usr/spool/at. Files in this directory are owned and writeable by the people who gave the corresponding "at" command, but because /usr/spool/at can only at present be written by root, users cannot delete their own "at" files. Can anyone suggest a way in which I can give this sort of access to /usr/spool/at without compromising system security by allowing the world to write to it? I'm a bit wary of creating a setuid'd program to do it. -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Steve Hayman <sahayman@iuvax.cs.indiana.edu> Subject: Re: How can I get the Frequently Asked Questions? Date: 27 Mar 90 14:37:30 GMT To: info-unix@sem.brl.mil >I receive the newsgroup, in digest form, from SEM.BRL.MIL, and have yet >to see the frequently asked questions posting (I suppose it gets editted >out??). Should I be seeing it? Various people have made this same complaint from time to time. I have checked with the maintainers of the info-unix digest gateway, and nobody is editing out the FAQ posting from the digest. It is merely a mail reflector that sends out every posting that comes in. It could be that the size of the FAQ posting makes that particular issue of the digest too large for your mailer to handle. The current posting is over 40K in size. (I am trying my best to keep it from growing much larger.) Steve -- Steve Hayman Workstation Manager Computer Science Department Indiana U. sahayman@iuvax.cs.indiana.edu (812) 855-6984 ----------------------------- From: "ryerson.schwark" <ry@cbnewsl.att.com> Subject: Re: AT&T source license Date: 27 Mar 90 14:24:53 GMT To: info-unix@sem.brl.mil meissner@osf.org (Michael Meissner) writes: >jstewart@madhaus.utcs (John Stewart) writes: > >| We'd like to get source code for Mach from CMU. The bottleneck is that we >| need to get an AT&T Unix source license so we can get a BSD source license >| so we can a Mach license. Confused? Join the crowd. >| >| I've tried talking to AT&T but with little success so far. The people >| I've spoken to seem to think any type of source license would cost around >| $100,000. Maybe that would be reasonable if we were a commercial company >| doing Unix development but we're not. We don't need AT&T source code at >| all; all we need is a piece of paper that will make Berkeley happy. > >BSD code contains source code from the original UNIX'es. Mach 2.5 >contains BSD code (which contains AT&T code). Thus you need to get >AT&T source code. If AT&T no longers offers a reduced license >agreement for Universities, and does not offer earlier versions of >Unix (I believe you need at least a 32V license, you may need a System >V.2 license, which went for ~40,000), you are indeed between a rock >and a hard place. Since they own the source rights, there is not much >you can do.... AT&T remains committed to educational pricing. A University-wide license for Release 3.0 costs $1200, and would grant you the rights that you need. Release 4.0 is also available if you are interested. The Price of $100,000 is the commercial price for a Release 4.0 license. I'm sorry that the people you have spoken to have been less than helpful. Pleae try the 1-800-828-UNIX number and identify yourself as from a university(I'm assuming from your header that you are), and let them know that you need a Release 3 license. They can explain the information that they need. If you have any further problems, please feel free to call me at (201) 644-3770, and I'd be glad to help. Ry Schwark ryerson.schwark@att.com att!uso!ry UNIX Software Operation ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: AT&T source license Date: 27 Mar 90 18:22:11 GMT Followup-To: comp.os.mach To: info-unix@sem.brl.mil >If AT&T no longers offers a reduced license agreement for Universities, Which, of course, they used to, and at a relatively low price (< $1K, when last I kept track of that stuff; I don't know what the most recent price is). I'd suggest that the original poster beat up their AT&T office harder to see whether academic licenses are still offered. ----------------------------- From: Mark Harrison <harrison@necssd.nec.com> Subject: Re: Programmers Prefer 8.5 x 11 Date: 27 Mar 90 15:49:29 GMT To: info-unix@sem.brl.mil My 2 cents: 1. I like 8.5 x 11 because it is easy to copy, and because it is easy to punch holes in magazine articles, etc, and stick them in. 2. I like the boxes many 5.5 x 8.5 binders come in. One problem with having a lot of looseleaf binders on a shelf is that the spine is wider than the other end, and they don't stay on the shelf so well. The boxes fix this. 3. For general reading, I like bound books. I don't like them for reference stuff because they don't lie flat and they are too hard to copy. (I heard a Borland guy give a talk, and being hard to copy was one of the reasons they went with bound docs... the other was the much lower price.) the reasons Note: the above references to copying should not be interpreted as a cavalier approach to other's copyrights... I copy within the restrictions of the US copyright code. -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply... ----------------------------- From: Daniel McKeel <dm76+@andrew.cmu.edu> Subject: PC/IX Date: 27 Mar 90 16:33:06 GMT To: info-unix@sem.brl.mil Could someone advise me if the old unix PC/IX for the IBM PC will run on a NON TRUE BLUE system.I've tried but no luck.I have all manuals for the beast.Any would be great Please mail any info to dtm@me.ri.cmu.edu. Thanks Dan McKeel ----------------------------- From: Cookson <cookson@helios.mitre.org> Subject: Archive Question Date: 27 Mar 90 17:18:03 GMT Sender: news@linus.uucp To: info-unix@sem.brl.mil Is there a way to get access to things like the comp.sources.unix archives on uunet (or anywhere for that matter) when one doesn't have ftp?? Thanks in advance, Dean % Dean Cookson $ Anyone can be taught to sculpt % % cookson%helios@mbunix.mitre.org $ Michaelangleo would have had to % % {devax,et al..}!linus!mbunix!helios!cookson $ have been taught how not to. % % Disclaimer: My opinions are my own, leave $ The same is true of great % % employer out of it $ programmers % ----------------------------- From: "Brando W. Brown" <brando@uiucme2.me.uiuc.edu> Subject: Re: Archive to tape software Date: 27 Mar 90 17:31:48 GMT Sender: News <usenet@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil In article <22860@adm.BRL.MIL> ZZASSGL%cms.manchester-computing-centre.ac.uk@nsfnet-relay.ac.uk writes: > > >I am looking for a file archive system for a large Sys V Unix (UTS) system. > Try REELbackup by Sceptre Corporation. It supporsts tape recycling, mailing to administration personnel, paging administrators, etc... +============================================================================+ | Brandon Brown Internet: brando@uiucme.me.uiuc.edu | | Addamax Corporation UUCP: uunet!uiucuxc!addamax!brown | | 2009 Fox Drive GEnie: xmg23356 macbrando | | Champaign, IL 61820 CompuServe: 73040,447 | +============================================================================+ ----------------------------- From: "Brando W. Brown" <brando@uiucme2.me.uiuc.edu> Subject: Re: 4.3 System Administration Training Courses Date: 27 Mar 90 17:36:38 GMT Sender: News <usenet@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil In article <5587@bgsuvax.UUCP> denbeste@bgsuvax.UUCP (William C. DenBesten) writes: >I am looking for information on a course that I could take that will teach >me how to become a system administrator on a 4.3BSD machine. > >I am looking in particular for things like setting up ethernet >interfaces, compiling kernels, managing mail/printers/news, and >building boot tapes > If you are set on taking classes, skip this message, but an excellent system administration book was just published by Prentice Hall called "Unix System Administration Handbook" written by Nemeth Snyder and Seebass. It provides good, useful information for the system administrator. It is more of a begin- ners book, however. +============================================================================+ | Brandon Brown Internet: brando@uiucme.me.uiuc.edu | | Addamax Corporation UUCP: uunet!uiucuxc!addamax!brown | | 2009 Fox Drive GEnie: xmg23356 macbrando | | Champaign, IL 61820 CompuServe: 73040,447 | +============================================================================+ ----------------------------- From: Mark Runyan <runyan@hpcuhc.hp.com> Subject: Re: RCS: how do you freeze a configuration? Date: 27 Mar 90 17:43:51 GMT To: info-unix@sem.brl.mil >/ meyer@gorgo.ifi.unizh.ch (Urs Meyer) / 7:34 am Mar 26, 1990 / > >One question remains open in >my opinion. Say, you have a collection of files, each with a (possibly) >different revision number. In order to create a configuration ready to >be released, I'd like to assign the same symbolic name to the latest >revision of each file, s.t. the symbol is fixed to the latest revision >forever. A possible solution using existing RCS commands. rcs -nSymbolName: *,v Where "SymbolName" is a symbolic name that you wish to use to indicate a particular revision, the ":" implies set "SymbolName" to top revision of the file, and "*,v" means all the RCS files. For instance, if I had 3 different directories, with RCS subdirectories, and each directory had twelve files, whose top revision number varies between 1.1 and 20.6, and I want to mark the top revision with one symbol, I could do: rcs -nRel_A/B1/00: */RCS/*,v and Rel_A/B1/00 would point (fixed) to the top revision of all those files. So Rel_A/B1/00 might point to 1.1 in fileA of the first directory, but it could also point to 20.6 in fileN of the third directory. The ":" without a number means point to the top most revision of the file. Mark Runyan ----------------------------- From: Dion Hollenbeck <hollen@megatek.uucp> Subject: Re: RCS: how do you freeze a configuration? Date: 27 Mar 90 20:53:51 GMT To: info-unix@sem.brl.mil From article <1990Mar26.153424.16557@gorgo.ifi.unizh.ch>, by meyer@gorgo.ifi.unizh.ch (Urs Meyer): > Hello, > > I followed the recent discussion about rcs (and sccs), specifically the > symbolic revision numbers are of interest. One question remains open in > my opinion. Say, you have a collection of files, each with a (possibly) > different revision number. In order to create a configuration ready to > be released, I'd like to assign the same symbolic name to the latest > revision of each file, s.t. the symbol is fixed to the latest revision > forever. > There are three flags which you need to know about. "-m" will enter the quoted log message of your choice. "-n" will attach a symbolic name to the highest existing revision of an RCS file, but will refuse with an error message if this symbolic name has already been given to another revision. "-N" is the same, but it will force the highest rev to get the symbolic name even if it was given before. We use "-N" so that after you have marked a release snapshot and then find out that you need to change one file and re-mark it with the same name, the override will apply. Here is a sample shell script which we use. --------------------------- cut here ------------------------------- #!/bin/sh # # NAME # rel - Check in for a new release # # DESCRIPTION # This script checks out all the source and include files, then # checks them in again with the new release name. # for i in \ gc.c gc.h gc_misc.c \ gc_rb.c gc_rbovr.c gd.c gd_aaa.c gd_all.h gd_cb2.c gd_cb2.h \ gm.c gm.h os.c os.h do echo $i: co -l $i ci -f -u -m"-- Release 2.0 --" -NRelease2_0 -sRel $i done -------------------- cut here ------------------- Alternately, the "for i in file1 file2 file3...filen" could be replaced with a wildcard expression to get all files: for i in RCS/*,v or for i in *,v or for i in RCS/*-- Dion Hollenbeck (619) 455-5590 x2814 Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121 uunet!megatek!hollen or hollen@megatek.uucp ----------------------------- From: Paul Houtz <gph@hpcc01.hp.com> Subject: Problems with diff -e and ed? Date: 27 Mar 90 18:12:29 GMT To: info-unix@sem.brl.mil Does anyone know what types of problems are associated with using diff -e and then storing the result and the original and using it as backup file, using ed to restore the original. I know that a file with a line with a single . in it will confuse ed, and I have taken care of that. Is there anything else? Thanks! gph@hpsdesis.HP.COM ----------------------------- From: "D'Arcy J.M. Cain" <darcy@druid.uucp> Subject: Re: ANSI header files Date: 27 Mar 90 18:17:13 GMT To: info-unix@sem.brl.mil In article <2105@kiwi.mpr.ca> parker@zaphod.mpr.ca (Ross Parker) writes: >Does anyone know if ANSI header files are available for UNIX >(specifically Ultrix 3.0 & 3.1)? I.e. header files to replace >the standard /usr/include/... but complete with function prototypes? > I have been modifying the standard files for SV3.2 (ESIX) and would not mind posting the results but I am not sure what the copyright situation would be. I don't think diffs would be as universally useful as the full files. I suppose I could simply extract the function prototypes and post them but that seems too much like work. Any ideas? -- D'Arcy J.M. Cain (darcy@druid) | Thank goodness we don't get all D'Arcy Cain Consulting | the government we pay for. West Hill, Ontario, Canada | (416) 281-6094 | ----------------------------- From: daisy basto <daisy@mavrick.uucp> Subject: Re: How to set TERM for Televideo? Keywords: Televideo Date: 27 Mar 90 19:06:14 GMT To: info-unix@sem.brl.mil Thanks for everyone who emailed. It's working now (more or less). I'm not sure whether it's using termcap or terminfo. There is one LARGE /etc/termcap file with lots of terminals defined and about 30 files in /usr/lib/terminfo/t. I think it's using terminfo though. When I tried compiling a C program with -ltermcap it couldn't find that library. And, by the way, I'm using SysV. Thanks, Daisy ----------------------------- From: "Malcolm L. Carlock" <malc@unrvax.unr.edu> Subject: ``Office Automation'' under Unix? Date: 27 Mar 90 19:18:04 GMT Sender: news@tahoe.unr.edu To: info-unix@sem.brl.mil Has anyone out there had experience with any "office automation" systems running on Unix machines? I'm thinking along the lines of something like DEC's All-In-One, perhaps a bit less ostentatious. The two main facilities that are being sought are email (piece o' cake) and some sort of calendar/ scheduling system, not unlike what I'm told appears in WordPerfect's office automation system. I suspect we could write our own "office automation system" without too much trouble, using existing lower-level facilities, but I'd be interested in the opinions and experiences of others in this area. Again, we'd be wanting to run this on a Unix machine. The machine we have in mind is running 4.3 BSD, though we could also run this on a medium-size Sun that's here. We're currently awaiting a call back from Sun on this (we're also waiting to hear back from DEC on an Ultrix version of All-In-One, though we don't currently have a large Ultrix machine we'd be running it on.) Be nice if we found a decent PD one though... Please respond via email and I will summarize to the net. Thanks in advance, Malcolm L. Carlock Internet: malc@unrvax.unr.edu UUCP: uunet!unrvax!malc ----------------------------- From: Jim Reid <jim@computer-science.strathclyde.ac.uk> Subject: Re: File server security Date: 27 Mar 90 19:22:01 GMT Sender: news@cs.strath.ac.uk To: info-unix@sem.brl.mil In article <Mar90.193112.9456@ixi.co.uk> paul@ixi.co.uk (Paul Davey) writes: }In article <9926@batcomputer.tn.cornell.edu> }rogerj@tcgould.tn.cornell.edu (Roger Jagoda) writes: }>Is there a way to limit rlogin, telnet, ftp access to just }>a few users (the net administrators). ... } }Set up a netgroup named say "admin" under yp with your }administrators listed as a set of users, leave the domain }and machine fields empty (wild). }In your server passwd files use +@admin instead of + to }include just the members of the admin group. } }The only problem I have found with this is that the yp master }passwd file is usually on a server... Of course, if you're using YP, security has long gone out the window..... Jim ----------------------------- From: rkc <rkc@xn.ll.mit.edu> Subject: gas Date: 27 Mar 90 21:46:27 GMT FCC: ~/SMAIL To: info-unix@sem.brl.mil (This may be a repost. Apologies for our mailer.) Awhile back we were using GCC with Sun's assembler. At that time I had written the following copy code: asm volatile("tstl %4;jle 1$;subqw #1,%4; 0$: movel %1@+,%0@+; dbf %4,0$;1$:" : "=a" (p_to), "=a" (p_from) : "0" (p_to), "1" (p_from), "d" (n_longs) ); Now we have converted to Gas (Gnu's assembler), which doesn't seem to understand the 0$ construct. Can someone point me to some documentation on gas and how to create these local variables, or perhaps point me to a correct newsgroup to mail this to. Thanks, -Rob ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: termcap or terminfo? Date: 27 Mar 90 22:49:59 GMT To: info-unix@sem.brl.mil In article <255@mavrick.UUCP> daisy@mavrick.UUCP (daisy basto) writes: >I think it's using terminfo though. When I tried compiling a C program with >-ltermcap it couldn't find that library. And, by the way, I'm using SysV. Try -ltermlib, which is the proper name for the termcap support library. Or, try -lcurses; it it satisfies references to the tgetent() etc. calls then it's probably terminfo-based, otherwise you would have needed both -lcurses and -ltermlib for curses-using applications. ----------------------------- From: John Nall <nall@sun8.scri.fsu.edu> Subject: Availability of Korn Shell Date: 28 Mar 90 00:30:58 GMT Sender: news@vsserv.scri.fsu.edu To: info-unix@sem.brl.mil Can some knowledgeable gentleperson tell me how to go about getting the source of the Korn Shell (assuming such a thing is possible)? My understanding - which may be incorrect - is that it is available as a part of the AT&T Toolchest, so the question might should have been better phrased. However, hopefully it is adequate. We (Florida State University) are properly licensed for AT&T Unix, for BSD 4.x (sufficient for Mach, anyway), and the proper CPU's are covered. Any suggestions or helpful comments (including potential vendors - we do not particularly expect things to be free, although it would be nice) by e-mail would be greatly appreciated. John Nall nall@nu.cs.fsu.edu -- John W. Nall | Supercomputation Computations Research Institute nall@nu.cs.fsu.edu | Florida State University #include <clever.h> | Tallahassee, FL 32306 ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (06/06/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 3 Jun 90 06:49:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#050 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Sun, 3 Jun 90 06:34:44 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab23416; 3 Jun 90 5:54 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa23412; 3 Jun 90 5:45 EDT Date: Sun, 03 Jun 90 05:45:35 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#050 Message-ID: <9006030546.aa23412@SEM.BRL.MIL> INFO-UNIX Digest Sun, 03 Jun 1990 V10#050 Today's Topics: Sendmail help nap(2) for AT&T UNIX V.3 Re: Copying /dev/* to another partition how to make fifos keep data? Re: Where should I go to find a terminfo/termcap description? RFS Performance Info Re: How secure is UNIX? Re: SEX! or, how do I mail to a lot of unix users? Re: looking for C language file differ /dev/dsk/0p0 -> vp/ix (was Re: DOS Norton NCD under VP/ix causes panic) _cleanup() before fork()? (was Re: How to terminate a child ...) postprocessor for ditroff ? jetroff ? Re: postprocessor for ditroff ? jetroff ? Re: Why partition disks? need help with 'curses' Re: Why /etc/mtab? (was: Example modification of /etc/mtab wanted) Can the output to a terminal be monitored? Re: Can the output to a terminal be monitored? Lunar calenders ----------------------------------------------------------------- From: John Macdonald <jmm@eci386.uucp> Subject: Sendmail help Date: 27 May 90 05:30:26 GMT To: info-unix@sem.brl.mil Is there a good reference anywhere for sendmail? (I checked, O'Reilly does not have a Nutshell book that covers it.) I'm trying to use it for the first time to set up a site with two systems (a Sun 3 and a MIPS) connected by Ethernet&TCP/IP, where one of them has a modem and uucp connection to an outside system. I have set it up so that the machine with the modem uses TCP/IP for known local machines (currently just the one), delivers local stuff locally, and uses the outside system to resolve anything else. If someone has a sendmail.cf that fits this situation, I'd be happy to receive a copy. (They don't have a domain name yet, but that is no problem for the moment.) I have the Sun sysadmin manual, and it has a fairly long section on sendmail, but it is missing a lot of connection between the description of low-level items in the sendmail.cf file and the high-level description of the sorts of things you can do with sendmail. At the moment, my problem it that lots of large messages just sit in the queue and are never passed on, in one case to lmail (it came from a remote machine) and in the other cases to uux. There are some descriptions of options that control penalty factors for priority, but never a description of what priority really means (in terms of how it affects *when* a piece of mail will actually get processed - it does say that a higher priority number means a heaavier penalty. (In actual operation it generally seems to choosing between three choices - a fair number of small messages are processed immediately, a small number of "intermediate" sized messages are queued for a while and then processed, and a large number of large messages get queued forever (a week so far)). I have also tried using the debug command line option, trying to run it against a specific queued element, hoping to get so idea of why the items a staying on the queue, but that just seems to debug the non-existent message that it assumes that I'm piping in to it, and complains that there is no destination specified. The reference in the manual that says "debug is very useful, if you have source code you look around to find out what the codes and levels actually mean" is rather discouraging to someone without source code, but I just turned on everything and waded through a huge amount of extraneous blather before I could figure that out. (Source code would have allowed me to try and figure out the queueing penalty algorithm too.) I'm strongly tempted to dump sendmail and just use smail 2.5, but if someone can convince me otherwise... -- Algol 60 was an improvment on most | John Macdonald of its successors - C.A.R. Hoare | jmm@eci386 ----------------------------- From: "Mark J. DeFilippis" <mark@promark.uucp> Subject: nap(2) for AT&T UNIX V.3 Keywords: nap SCO AT&T Date: 30 May 90 02:15:54 GMT To: info-unix@sem.brl.mil I remember seeing this before, but my memory does not serve me well. I need to implement a nap(2) similar to that found in SCO UNIX and SCO XENIX under AT&T Unix which allows me to sleep < 1 sec. I have both SCO and AT&T UNIX for i386. AT&T UNIX has no such animal. I was going to fake it by using a streams device and use its timeout ability in the POLL(2) but it is a kludgy hack I prefer not to put my name on. Besides I think the stream would have to be a real physical device and I don't have one I can just give up) If anyone has done this before and can point me at a starting place, or give me a short outline of what is required I would really appreciate it. Email would be best as I don't get to read news consistently these days. Probably how i missed the solution (if there was one) in the first place. -- Mark J. DeFilippis UUCP: uunet!adelphi!markd ----------------------------- From: Larry McVoy <lm@snafu.sun.com> Subject: Re: Copying /dev/* to another partition Date: 31 May 90 01:45:47 GMT Sender: news@sun.eng.sun.com To: info-unix@sem.brl.mil In article <2538@tuminfo1.lan.informatik.tu-muenchen.dbp.de> k2@charly.bl.physik.tu-muenchen.de (Klaus Steinberger) writes: >rtidd@mwunix.mitre.org (Randall Tidd) writes: > >>I am running SunOS 4.1 on a Sun 3/160. > >>I am trying to clone my root partition to a backup partition (just >>root and subdirectories, but *not* other partitions such as /usr, >>/home, etc). I ran into a problem when trying to copy /dev; when I >>try to cp /dev/sd0a (for example), it will try to read from the device >>/dev/sd0a rather than copy the actual file /dev/sd0a. > >Use cpio or tar for this purpose. That's the way to do it. And don't forget to install the boot block - just copying it doesn't work. Check out installboot(8). Also - your backup /etc/fstab is going to be different. As a side note to sys admins: what this person is trying to do is *really* handy if you are the sort that trashes partitions. I do file system development and I can't survive w/o a backup root & usr. --- Larry McVoy, Sun Microsystems (415) 336-7627 ...!sun!lm or lm@sun.com ----------------------------- From: Mathias Koerber <koerberm@nixsin.uucp> Subject: how to make fifos keep data? Keywords: fifos pipes crash Date: 31 May 90 08:39:57 GMT To: info-unix@sem.brl.mil Hello netlanders, I have a somewhat urgent problem on my hands, so could you please help me? I need to know if there is a possibilty to make named pipes (fifos) on Unix SysV keep their data, even when the reading process dies or the machine crashes. What I think of is someting like buffering on disk. I observed that the writing process may as well,die, no data is lost. But even if there is more data available, a crash of the reading process deleted all the data that has already been written to the pipe. I have to use the pipes to transfer data from a unix-device-handler into PROGRESS 4GL/RDBMS online so that the database can be updated immediately. I cannot do anything on the reading side, but the writing side might be able to set some parameters etc. If anyone knows how to accomplish this, please let me know, I would be very grateful. My configuration: Nixdorf Targon /31 M15 TOS4.0.11 Thx, Mathias -- Mathias Koerber |Tel: +65 / 7473828 ext 1852|Fax: +65 / 7474331 Nixdorf Computer Singapore|EUnet: koerber.sin@nixpbe |nerv: koerber.sin 2 Kallang Sector |uunet: uunet!linus!nixbur!koerber.sin Singapore 1334 |[Standard-disclaimer:All views personal... ] ----------------------------- From: Ray Shwake <shwake@raysnec.uucp> Subject: Re: Where should I go to find a terminfo/termcap description? Date: 1 Jun 90 14:14:02 GMT Followup-To: comp.terminals To: info-unix@sem.brl.mil In article <697@hades.OZ> greyham@hades.OZ (Greyham Stoney) writes: >Is there some central registry of terminfo/termcap descriptions anywhere?. >I'm really after a Terminfo for an ICL6402; but I don't know where to start >looking. Assuming that ICL itself can't provide the info (which one might assume it can), find out if the ICL6402 represents a simple renaming of some other terminal. I know that ICL recently purchased Computer Consoles (CCI); perhaps the terminal once had another moniker. ----------------------------- From: tim@nttor.uucp Subject: RFS Performance Info Date: 1 Jun 90 15:19:11 GMT Sender: "Tim Finnerty"@nttor.uucp To: info-unix@sem.brl.mil This is a posting from comp.unix. I hope to get more of a response here. -------------> We are working on what is essentially an embedded system using VME hardware and Motorola's System V/68 (V.3). We are considering using RFS to support interworking of 2 or more such systems. I would like to get some feedback on how well RFS performs. Specifically I would like to know: 1) the relative performance of remote file access vs. local file access using RFS 2) how well does it recover (e.g. if a machine using a directory mounted from another machine goes down, does it come back up and reaccess the directory without intervention and vice versa.) 3) what happens if a client crashes while updating a remote file 4) synchronization of mountable resources; can a mountable resource be found if the server comes up after the client, without manual intervention 5) what is the system overhead of using RFS 6) the relative performance of using remote named pipes vs. local named pipes 7) the relative performance of using remote devices vs. local devices 8) any misc. pitfalls; things that don't work as advertised; surprises For instance, re 1), I have been told that remote file access using RFS is roughly 4 times slower than on a local disk (using the same hardware - MVME147 CPU, SCSI interface). If you can recommend any books or periodical articles it would greatly appreciated as well. Tim Finnerty {lsuc,utzoo,mnetor}!dciem!nttor!tim Northern Telecom, Toronto, Canada. (416) 598-0196 x2417 ----------------------------- From: Richard Meesters <ram@attcan.uucp> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 1 Jun 90 15:19:32 GMT To: info-unix@sem.brl.mil In article <1990Jun1.063800.17539@athena.mit.edu>, jik@athena.mit.edu (Jonathan I. Kamens) writes: > In article <11513@vpk1.UUCP>, ram@attcan.UUCP (Richard Meesters) writes: rm |> The point is, however valid. If you are going to use a .netrc, why rm cant it be rm |> more like the passwd system. This merely means that the ftp program must rm |> provide the facilities for encryption/decription of the password, rm rather than rm |> leaving it up to the user to do so himself. > > First of all, the ftp protocol doesn't say, "Two machines talking to > each other using the protocol must both be Unix machines that use a > standard crypt() function for password verification." What it says is > that there is a protocol command to send a password from the client to > the server, and that server may use the password for verification in > whatever way it chooses. I'm not suggesting that we necessarily use the crypt() function call ala UNIX to provide the data encryption. What I'm suggesting is that perhaps the ftp code should include some form of encryption/decryption algorithm to protect the password information. IMHO, any plain-text password stored on a system is a security risk, no matter how well it is protected. > > Second, if the client is supposed to do password encryption, then > what's to stop me from logging into your machine, grabbing your > encrypted password string from the /etc/passwd file, then ftp'ing back > to the same machine with a hacked ftp client which sends that encrypted > string as the password? The ftp server says, "Gee, look, you've sent me > the correct encrypted password!" and goes right ahead believing that I'm you. Again, see above. It doesn't have to be the same encryption algorithm that is used for /etc/passwd (or use the same key?). So the password in /etc/passwd does not necessarily have any bearing on the passwd in .netrc. The danger of a plain-text passwd in a file is that someone only has to SEE it, rather than necessarily decrypt it to be able to use it. > > If I've misunderstood what you're suggesting, then please forgive me, > and please explain more clearly what you're suggesting. If not, I think > you've got to think through a bit more clearly exactly how ftp > authentication, and Unix password authentication in general, works. > Like I said in my previous posting, I'm by no means an expert on the topic, but rather just kicking around ideas. I appreciate your input. Regards, ------------------------------------------------------------------------------ Richard A Meesters | Technical Support Specialist | Insert std.logo here AT&T Canada | | "Waste is a terrible thing ATTMAIL: ....attmail!rmeesters | to mind...clean up your act" UUCP: ...att!attcan!ram | ------------------------------------------------------------------------------ ----------------------------- From: Brian Fenske <fenske@iftccu.ca.boeing.com> Subject: Re: SEX! or, how do I mail to a lot of unix users? Date: 1 Jun 90 16:51:07 GMT To: info-unix@sem.brl.mil I don't know if this command is available on all versions of UNIX but on our Sequent you can use the "users" command to produce a string of usernames. If joe, fred, bob and scooter are logged in, users produces joe fred bob scooter You could then just say mail `users` < message -- Brian Fenske Manufacturing Research & Development Boeing Commercial Airplanes 747-400 Integrated Functional Test System P.O. Box 3707, M/S 0P-37 (206) 342-5784 Seattle, WA 98124 ...uunet!bcstec!iftccu!fenske ----------------------------- From: "Murray S. Kucherawy" <murray@motto.uucp> Subject: Re: SEX! or, how do I mail to a lot of unix users? Date: 1 Jun 90 19:50:04 GMT To: info-unix@sem.brl.mil thermal%solgel.hepnet@CSA2.LBL.GOV.UUCP writes: >I would like to be able to send a mail message to all the users on >a unix machine... If you're lucky enough to have a system where each user has a directory someplace common (ie. /u/<username> for each user), then csh has a nice way of doing it: 1) Create the document you want to send 2) % foreach i (/u/*) ? mail -s "Memo for you" $i < source-file ? echo sent to $i ? end That oughta do it... =============================== Murray S. Kucherawy ========================== Motorola Canada, Ltd. Communications Division, Toronto [on work term] University of Waterloo, Ontario, Canada 2A Math (Comp Sci/Pure Math) Internet: murray@motto.UUCP (work) mskucherawy@watmath.UWaterloo.ca (UW) UUCP: uunet!utai!lsuc!motto!murray uunet!watmath!mskucherawy ----------------------------- From: habafropzipulops <david@eng.sun.com> Subject: Re: looking for C language file differ Date: 1 Jun 90 17:57:35 GMT Sender: david@sun.eng.sun.com To: info-unix@sem.brl.mil In article <1990May31.185500.29790@cbnewsd.att.com> jlash@cbnewsd.att.com (john.k.lash) writes: >Does anyoue have or know of a "syntax tolerant" diff program for C files? Sure -- Dick Grune's "sim". It's in the comp.sources.unix archives, vol 3 and 4. -- David DiGiacomo, Sun Microsystems, Mt. View, CA david@eng.sun.com ----------------------------- From: Martin Weitzel <martin@mwtech.uucp> Subject: /dev/dsk/0p0 -> vp/ix (was Re: DOS Norton NCD under VP/ix causes panic) Keywords: ncd, norton, vpix Date: 1 Jun 90 20:50:43 GMT To: info-unix@sem.brl.mil In article <1990May31.165403.4270@esegue.segue.boston.ma.us> johnl@esegue.segue.boston.ma.us (John R. Levine) writes: >In article <505@al.ele.tue.nl> raymond@ele.tue.nl (Raymond Nijssen) writes: [about crashing unix thru disk accesses from vp/ix] >However, there is another approach you might try. The way you are getting >from vp/ix to the DOS disk is extremely convoluted: first Unix is simulating >Unix files on top of the DOS file system, then vp/ix is using simulated remote >networked DOS files on top of the simulated Unix files on the DOS file system. >vp/ix, being DOS after all, can get to the DOS file system directly. Unmount >the /dos partition and add to your vpix.cnf file a line like > >D /dev/dsk/0p0 Well, if I hear that some DOS *application* can crash my UNIX thru vp/ix, I feel *very* reluctant to give access to my complete harddisk (and to this does "/dev/dsk/0p0" refer) to vp/ix. Related question: What about security issues? Again I feel very reluctant to expose "/dev/dsk/0p0" to some untrusted program. (Well I admit, I'm a little biased against DOS and vp/ix belongs into this category, though I have it installed here.) -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83 ----------------------------- From: Martin Weitzel <martin@mwtech.uucp> Subject: _cleanup() before fork()? (was Re: How to terminate a child ...) Date: 1 Jun 90 22:57:43 GMT To: info-unix@sem.brl.mil In article <845:May2718:47:2590@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: [dd ...] >Using fflush() before a fork() is never wrong in practice; it's the only >way to guarantee that the child can safely use stdio; and the possible >efficiency hit is miniscule compared to the fork() time. While there may >be a few exceptions, novices should learn fflush()-fork() rather than a >fork()-_exit() that will ``mysteriously'' lose output. One remark to that: Requiring (or teaching novices) to fflush() all output streams before a fork() tends to clutter up the source with unnecessary global variables or introduce many additional parameters: If the program is halfway structured chances are big that the respective FILE-pointers are not normally visible at the point were the program fork()s. It would be quite helpful if stdio had officially defined some "fflush_all()" operation - which is necessary anyway, because its implicitly called by exit(). For as much as I know the usual name of this routine is "_cleanup()", but using it - of course - is not recommendable for portable programs. BTW: I would not be surprised if someone finds it a useful idea to make fork() call _cleanup() implicitly some day, because he was burned by accidentially duplicated output. Though I would not like to see this, there have allready been worse things in this area, eg. fiddling with PATH and UID's within execv(), which has broken some clean and useful code in the attempt to provide a general fix for sloppily designed programs. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83 ----------------------------- From: "Steinar O. Cook" <soc@dr.uucp> Subject: postprocessor for ditroff ? jetroff ? Keywords: ditroff Date: 2 Jun 90 10:05:30 GMT To: info-unix@sem.brl.mil I'm running DWB on a 386 machine with Interactive UNIX. Does anyone know of a postprocessor for ditroff which supports HP Laserjet ? Please send answers to: steinar@balder.uucp or ..!uunet!mcsun!nuug!dr!balder!steinar ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: postprocessor for ditroff ? jetroff ? Keywords: ditroff Date: 2 Jun 90 21:23:22 GMT To: info-unix@sem.brl.mil In article <648@dr.uucp> soc@dr.uucp (Steinar O. Cook) writes: >I'm running DWB on a 386 machine with Interactive UNIX. Does anyone know >of a postprocessor for ditroff which supports HP Laserjet ? The answer to this question (and zillions of others) is in the recently posted i386 Frequently asked questions. If you can't find your copy, send me email and I will forward a copy to you. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: Ralph Finch <rfinch@caldwr.water.ca.gov> Subject: Re: Why partition disks? Keywords: partition, disk, SCSI Date: 2 Jun 90 16:50:45 GMT To: info-unix@sem.brl.mil In article <3419@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>1. Each file system can have at most 65,535 inodes, because the inode >>number is stored in a 16 bit field in the directories. > >Speak for yourself. There exist versions of UNIX with more modern file >systems that have 32-bit inumbers; the original poster didn't specify >what flavor of UNIX they have, so they may or may not have a 64K inode >limitation on their file systems. It's SunOS which I assume uses the 32-bit inumbers. My thinking right now is, one of the 1.2GB drives will be divided into 2 partitions, for /home and /pub stuff; the other just 1 partition, for large files (we run numerical models which tend to generate a few large files). Most concerns expressed so far have been about administering the drives, which is valid, but right now we just want some handy scratch space, mainly. -- Ralph Finch 916-445-0088 rfinch@water.ca.gov ...ucbvax!ucdavis!caldwr!rfinch Any opinions expressed are my own; they do not represent the DWR ----------------------------- From: Qing Qi Tsao <tsao@helios.iec.ufl.edu> Subject: need help with 'curses' Date: 2 Jun 90 17:17:09 GMT Sender: news@bikini.cis.ufl.edu To: info-unix@sem.brl.mil I am goinh to use cursor addressing and screen display library:curses, and I do not have references except man pages, I will appreciate it very much if somebody can send me some information about it, including references or your experiences. I will post a summary when I have done. ----------------------------- From: Barry Shein <bzs@world.std.com> Subject: Re: Why /etc/mtab? (was: Example modification of /etc/mtab wanted) Date: 2 Jun 90 20:08:29 GMT Sender: Barry Shein <bzs@world.std.com> Followup-To: comp.unix.questions To: info-unix@sem.brl.mil >Which leads me to pose the question: > > Why does Unix use a file to store mount information? > >It seems to me that the proper way to determine what's mounted would >be to look in the kernel mount tables. It would be trivial to implement >a system call to return the information. Anyone know why the "ask the >kernel" approach was never taken? It goes way back to the early Unix days, V6 on the PDP-11 certainly had /etc/mtab. With a maximum of 64KB for the kernel you made trade-offs, one of Unix's early plus's was how much it used facilities outside the kernel to get things done. Design goals were also compelling. Of course, in this day and age it seems like a minor savings, but you could probably find dozens of things like this to put in the kernel if you looked around. The bloat would start to get real (why not store environment variables in the kernel so children can set parent processes? How about the password/group file? host tables? Heck, everything YP manages? etc etc.) There are a lot of us out there who hope the trend would be quite the other way, more for design reasons than memory concerns. Things in the kernel tend to quickly become immutable in various ways. Putting things in the kernel tends to make innovation impossible unless you're a kernel hacker (and have the sources, time and energy.) Just changing, e.g., the way a few fields in a text file are handled is not very hard if you wanted to extend mount table semantics. What you really want is just a putmountent() library to hide the details of the service, not to redesign Unix to make it easier to write that one library call. -- -Barry Shein Software Tool & Die | {xylogics,uunet}!world!bzs | bzs@world.std.com Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD ----------------------------- From: "Kevin D. Quitt" <kdq@demott.com> Subject: Can the output to a terminal be monitored? Date: 2 Jun 90 21:06:31 GMT To: info-unix@sem.brl.mil Is there a way that I (as root) can "tap into" a user to monitor terminal activity? I specifcally would like to do this for the modem line. -- _ Kevin D. Quitt Manager, Software Development 34 12 N 118 27 W DeMott Electronics Co. 14707 Keswick St. Van Nuys, CA 91405-1266 VOICE (818) 988-4975 FAX (818) 997-1190 MODEM (818) 997-4496 Telebit PEP last demott!kdq kdq@demott.com 96.37% of the statistics used in arguments are made up. ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: Can the output to a terminal be monitored? Date: 3 Jun 90 01:11:11 GMT To: info-unix@sem.brl.mil In article <270@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: > Is there a way that I (as root) can "tap into" a user to monitor >terminal activity? I specifcally would like to do this for the modem line. Not in software (unless you modify the software running on that port to dump the data to a log file that you tail). If what you want to do is to be able to abitrarily "tap" into a data line you must do it with hardware. This can be done in several ways including 1. a data line analyzer that captures all the data 2. a poor-mans data capture which uses a second serial port on your system and a special cable that wires TXD from the modem port to RXD on the second serial port. You can then tail this serial port whenever you want. Be sure that you do not have a getty running on the port and that if the second port requires DCD to be high you should loop DTR back to DCD. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: Bill Irwin <bill@twg.uucp> Subject: Re: Can the output to a terminal be monitored? Date: 3 Jun 90 03:46:14 GMT Expires: Sender: Followup-To: Keywords: To: info-unix@sem.brl.mil In article <270@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: > > Is there a way that I (as root) can "tap into" a user to monitor >terminal activity? I specifcally would like to do this for the modem line. I have had some success using the "tee" process. In the user's .profile, when it got to the place where the local menu system was going to be brought up, I modified it to read: menu | tee > .../.monitor This basically pumps all screen I/O from that point on into the ".monitor" file. If you use append (">>"), each session will be appended to the end of the file. The tricky part is that all escape sequences sent to the terminal are captured in the file. If you do a "cat .monitor", you will see a very fast version of the user's session (fast because any time the user spent thinking or looking at the screen will not be reflected in your viewing session), as though you were looking over their shoulder. But you need to view with the same terminal type that the user used, so that your terminal responds properly to the escape sequences fed to it from .monitor. In my experience, as soon as the user entered an application that put the terminal into "raw" mode, output into .monitor was suspended until they exited the application and became "cooked" again. This was frustrating. Kind of like following a lady spy and watching her go into the ladies room. You have to hang around outside waiting for her to out. How knows what secrets she passed on while she was in there! Also, I found that vi sessions didn't behave properly for the user being monitored. You loose the advantage of secrecy if the user knows (or suspects) they are being observed. I would be very interested in reading some responses that would suggest a solution to the vi and raw mode problems. -- Bill Irwin - TWG The Westrheim Group - Vancouver, BC, Canada ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uunet!van-bc!twg!bill (604) 431-9600 (voice) | UNIX Systems Bill.Irwin@twg.bc.ca (604) 431-4629 (fax) | Integration ----------------------------- From: Weil timothy <trw@aplcen.apl.jhu.edu> Subject: 'ghost' entries in directory Keywords: 'ghost entry', directory Date: 2 Jun 90 22:59:51 GMT To: info-unix@sem.brl.mil This is probably a common UNIX question the answer to which I've never seen - A bundled file is sent to a user with instructions to 'sh <file...>' which in the process makes directories and unpacks files... However, the 'mkdir <somedir>' fails (dont know why) & I'm left with unbundled files in my current directory... Problem -> the 'mkdir <somedir>' command did create a directory entry in '.' (current directory) BUT this new directory cannot be entered (via cd <somedir>) or recognized for deletion (rmdir <somedir> yields the error, 'directory does not exist'. What next? The <somedir> entry exists via 'ls -l' & I've tried changing owner, access rights, etc. Thanks in advance for any suggestions here... ----------------------------- From: Muhammad Farrukh Khan <khan@cs.purdue.edu> Subject: Lunar calenders Date: 3 Jun 90 02:15:41 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil Is there any command on UNIX systems which will give both solar and lunar calenders? I have once seen such a printout in the printer room. If not, is there a public domain program to give lunar dates? Thanks! ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (06/06/90)
----Reason for mail failure follows---- Sending mail to <ckaul%math@cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 3 Jun 90 06:59:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#050 To: "ckaul" <ckaul%math@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Sun, 3 Jun 90 06:34:44 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab23416; 3 Jun 90 5:54 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa23412; 3 Jun 90 5:45 EDT Date: Sun, 03 Jun 90 05:45:35 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#050 Message-ID: <9006030546.aa23412@SEM.BRL.MIL> INFO-UNIX Digest Sun, 03 Jun 1990 V10#050 Today's Topics: Sendmail help nap(2) for AT&T UNIX V.3 Re: Copying /dev/* to another partition how to make fifos keep data? Re: Where should I go to find a terminfo/termcap description? RFS Performance Info Re: How secure is UNIX? Re: SEX! or, how do I mail to a lot of unix users? Re: looking for C language file differ /dev/dsk/0p0 -> vp/ix (was Re: DOS Norton NCD under VP/ix causes panic) _cleanup() before fork()? (was Re: How to terminate a child ...) postprocessor for ditroff ? jetroff ? Re: postprocessor for ditroff ? jetroff ? Re: Why partition disks? need help with 'curses' Re: Why /etc/mtab? (was: Example modification of /etc/mtab wanted) Can the output to a terminal be monitored? Re: Can the output to a terminal be monitored? Lunar calenders ----------------------------------------------------------------- From: John Macdonald <jmm@eci386.uucp> Subject: Sendmail help Date: 27 May 90 05:30:26 GMT To: info-unix@sem.brl.mil Is there a good reference anywhere for sendmail? (I checked, O'Reilly does not have a Nutshell book that covers it.) I'm trying to use it for the first time to set up a site with two systems (a Sun 3 and a MIPS) connected by Ethernet&TCP/IP, where one of them has a modem and uucp connection to an outside system. I have set it up so that the machine with the modem uses TCP/IP for known local machines (currently just the one), delivers local stuff locally, and uses the outside system to resolve anything else. If someone has a sendmail.cf that fits this situation, I'd be happy to receive a copy. (They don't have a domain name yet, but that is no problem for the moment.) I have the Sun sysadmin manual, and it has a fairly long section on sendmail, but it is missing a lot of connection between the description of low-level items in the sendmail.cf file and the high-level description of the sorts of things you can do with sendmail. At the moment, my problem it that lots of large messages just sit in the queue and are never passed on, in one case to lmail (it came from a remote machine) and in the other cases to uux. There are some descriptions of options that control penalty factors for priority, but never a description of what priority really means (in terms of how it affects *when* a piece of mail will actually get processed - it does say that a higher priority number means a heaavier penalty. (In actual operation it generally seems to choosing between three choices - a fair number of small messages are processed immediately, a small number of "intermediate" sized messages are queued for a while and then processed, and a large number of large messages get queued forever (a week so far)). I have also tried using the debug command line option, trying to run it against a specific queued element, hoping to get so idea of why the items a staying on the queue, but that just seems to debug the non-existent message that it assumes that I'm piping in to it, and complains that there is no destination specified. The reference in the manual that says "debug is very useful, if you have source code you look around to find out what the codes and levels actually mean" is rather discouraging to someone without source code, but I just turned on everything and waded through a huge amount of extraneous blather before I could figure that out. (Source code would have allowed me to try and figure out the queueing penalty algorithm too.) I'm strongly tempted to dump sendmail and just use smail 2.5, but if someone can convince me otherwise... -- Algol 60 was an improvment on most | John Macdonald of its successors - C.A.R. Hoare | jmm@eci386 ----------------------------- From: "Mark J. DeFilippis" <mark@promark.uucp> Subject: nap(2) for AT&T UNIX V.3 Keywords: nap SCO AT&T Date: 30 May 90 02:15:54 GMT To: info-unix@sem.brl.mil I remember seeing this before, but my memory does not serve me well. I need to implement a nap(2) similar to that found in SCO UNIX and SCO XENIX under AT&T Unix which allows me to sleep < 1 sec. I have both SCO and AT&T UNIX for i386. AT&T UNIX has no such animal. I was going to fake it by using a streams device and use its timeout ability in the POLL(2) but it is a kludgy hack I prefer not to put my name on. Besides I think the stream would have to be a real physical device and I don't have one I can just give up) If anyone has done this before and can point me at a starting place, or give me a short outline of what is required I would really appreciate it. Email would be best as I don't get to read news consistently these days. Probably how i missed the solution (if there was one) in the first place. -- Mark J. DeFilippis UUCP: uunet!adelphi!markd ----------------------------- From: Larry McVoy <lm@snafu.sun.com> Subject: Re: Copying /dev/* to another partition Date: 31 May 90 01:45:47 GMT Sender: news@sun.eng.sun.com To: info-unix@sem.brl.mil In article <2538@tuminfo1.lan.informatik.tu-muenchen.dbp.de> k2@charly.bl.physik.tu-muenchen.de (Klaus Steinberger) writes: >rtidd@mwunix.mitre.org (Randall Tidd) writes: > >>I am running SunOS 4.1 on a Sun 3/160. > >>I am trying to clone my root partition to a backup partition (just >>root and subdirectories, but *not* other partitions such as /usr, >>/home, etc). I ran into a problem when trying to copy /dev; when I >>try to cp /dev/sd0a (for example), it will try to read from the device >>/dev/sd0a rather than copy the actual file /dev/sd0a. > >Use cpio or tar for this purpose. That's the way to do it. And don't forget to install the boot block - just copying it doesn't work. Check out installboot(8). Also - your backup /etc/fstab is going to be different. As a side note to sys admins: what this person is trying to do is *really* handy if you are the sort that trashes partitions. I do file system development and I can't survive w/o a backup root & usr. --- Larry McVoy, Sun Microsystems (415) 336-7627 ...!sun!lm or lm@sun.com ----------------------------- From: Mathias Koerber <koerberm@nixsin.uucp> Subject: how to make fifos keep data? Keywords: fifos pipes crash Date: 31 May 90 08:39:57 GMT To: info-unix@sem.brl.mil Hello netlanders, I have a somewhat urgent problem on my hands, so could you please help me? I need to know if there is a possibilty to make named pipes (fifos) on Unix SysV keep their data, even when the reading process dies or the machine crashes. What I think of is someting like buffering on disk. I observed that the writing process may as well,die, no data is lost. But even if there is more data available, a crash of the reading process deleted all the data that has already been written to the pipe. I have to use the pipes to transfer data from a unix-device-handler into PROGRESS 4GL/RDBMS online so that the database can be updated immediately. I cannot do anything on the reading side, but the writing side might be able to set some parameters etc. If anyone knows how to accomplish this, please let me know, I would be very grateful. My configuration: Nixdorf Targon /31 M15 TOS4.0.11 Thx, Mathias -- Mathias Koerber |Tel: +65 / 7473828 ext 1852|Fax: +65 / 7474331 Nixdorf Computer Singapore|EUnet: koerber.sin@nixpbe |nerv: koerber.sin 2 Kallang Sector |uunet: uunet!linus!nixbur!koerber.sin Singapore 1334 |[Standard-disclaimer:All views personal... ] ----------------------------- From: Ray Shwake <shwake@raysnec.uucp> Subject: Re: Where should I go to find a terminfo/termcap description? Date: 1 Jun 90 14:14:02 GMT Followup-To: comp.terminals To: info-unix@sem.brl.mil In article <697@hades.OZ> greyham@hades.OZ (Greyham Stoney) writes: >Is there some central registry of terminfo/termcap descriptions anywhere?. >I'm really after a Terminfo for an ICL6402; but I don't know where to start >looking. Assuming that ICL itself can't provide the info (which one might assume it can), find out if the ICL6402 represents a simple renaming of some other terminal. I know that ICL recently purchased Computer Consoles (CCI); perhaps the terminal once had another moniker. ----------------------------- From: tim@nttor.uucp Subject: RFS Performance Info Date: 1 Jun 90 15:19:11 GMT Sender: "Tim Finnerty"@nttor.uucp To: info-unix@sem.brl.mil This is a posting from comp.unix. I hope to get more of a response here. -------------> We are working on what is essentially an embedded system using VME hardware and Motorola's System V/68 (V.3). We are considering using RFS to support interworking of 2 or more such systems. I would like to get some feedback on how well RFS performs. Specifically I would like to know: 1) the relative performance of remote file access vs. local file access using RFS 2) how well does it recover (e.g. if a machine using a directory mounted from another machine goes down, does it come back up and reaccess the directory without intervention and vice versa.) 3) what happens if a client crashes while updating a remote file 4) synchronization of mountable resources; can a mountable resource be found if the server comes up after the client, without manual intervention 5) what is the system overhead of using RFS 6) the relative performance of using remote named pipes vs. local named pipes 7) the relative performance of using remote devices vs. local devices 8) any misc. pitfalls; things that don't work as advertised; surprises For instance, re 1), I have been told that remote file access using RFS is roughly 4 times slower than on a local disk (using the same hardware - MVME147 CPU, SCSI interface). If you can recommend any books or periodical articles it would greatly appreciated as well. Tim Finnerty {lsuc,utzoo,mnetor}!dciem!nttor!tim Northern Telecom, Toronto, Canada. (416) 598-0196 x2417 ----------------------------- From: Richard Meesters <ram@attcan.uucp> Subject: Re: How secure is UNIX? Keywords: Security, ftp Date: 1 Jun 90 15:19:32 GMT To: info-unix@sem.brl.mil In article <1990Jun1.063800.17539@athena.mit.edu>, jik@athena.mit.edu (Jonathan I. Kamens) writes: > In article <11513@vpk1.UUCP>, ram@attcan.UUCP (Richard Meesters) writes: rm |> The point is, however valid. If you are going to use a .netrc, why rm cant it be rm |> more like the passwd system. This merely means that the ftp program must rm |> provide the facilities for encryption/decription of the password, rm rather than rm |> leaving it up to the user to do so himself. > > First of all, the ftp protocol doesn't say, "Two machines talking to > each other using the protocol must both be Unix machines that use a > standard crypt() function for password verification." What it says is > that there is a protocol command to send a password from the client to > the server, and that server may use the password for verification in > whatever way it chooses. I'm not suggesting that we necessarily use the crypt() function call ala UNIX to provide the data encryption. What I'm suggesting is that perhaps the ftp code should include some form of encryption/decryption algorithm to protect the password information. IMHO, any plain-text password stored on a system is a security risk, no matter how well it is protected. > > Second, if the client is supposed to do password encryption, then > what's to stop me from logging into your machine, grabbing your > encrypted password string from the /etc/passwd file, then ftp'ing back > to the same machine with a hacked ftp client which sends that encrypted > string as the password? The ftp server says, "Gee, look, you've sent me > the correct encrypted password!" and goes right ahead believing that I'm you. Again, see above. It doesn't have to be the same encryption algorithm that is used for /etc/passwd (or use the same key?). So the password in /etc/passwd does not necessarily have any bearing on the passwd in .netrc. The danger of a plain-text passwd in a file is that someone only has to SEE it, rather than necessarily decrypt it to be able to use it. > > If I've misunderstood what you're suggesting, then please forgive me, > and please explain more clearly what you're suggesting. If not, I think > you've got to think through a bit more clearly exactly how ftp > authentication, and Unix password authentication in general, works. > Like I said in my previous posting, I'm by no means an expert on the topic, but rather just kicking around ideas. I appreciate your input. Regards, ------------------------------------------------------------------------------ Richard A Meesters | Technical Support Specialist | Insert std.logo here AT&T Canada | | "Waste is a terrible thing ATTMAIL: ....attmail!rmeesters | to mind...clean up your act" UUCP: ...att!attcan!ram | ------------------------------------------------------------------------------ ----------------------------- From: Brian Fenske <fenske@iftccu.ca.boeing.com> Subject: Re: SEX! or, how do I mail to a lot of unix users? Date: 1 Jun 90 16:51:07 GMT To: info-unix@sem.brl.mil I don't know if this command is available on all versions of UNIX but on our Sequent you can use the "users" command to produce a string of usernames. If joe, fred, bob and scooter are logged in, users produces joe fred bob scooter You could then just say mail `users` < message -- Brian Fenske Manufacturing Research & Development Boeing Commercial Airplanes 747-400 Integrated Functional Test System P.O. Box 3707, M/S 0P-37 (206) 342-5784 Seattle, WA 98124 ...uunet!bcstec!iftccu!fenske ----------------------------- From: "Murray S. Kucherawy" <murray@motto.uucp> Subject: Re: SEX! or, how do I mail to a lot of unix users? Date: 1 Jun 90 19:50:04 GMT To: info-unix@sem.brl.mil thermal%solgel.hepnet@CSA2.LBL.GOV.UUCP writes: >I would like to be able to send a mail message to all the users on >a unix machine... If you're lucky enough to have a system where each user has a directory someplace common (ie. /u/<username> for each user), then csh has a nice way of doing it: 1) Create the document you want to send 2) % foreach i (/u/*) ? mail -s "Memo for you" $i < source-file ? echo sent to $i ? end That oughta do it... =============================== Murray S. Kucherawy ========================== Motorola Canada, Ltd. Communications Division, Toronto [on work term] University of Waterloo, Ontario, Canada 2A Math (Comp Sci/Pure Math) Internet: murray@motto.UUCP (work) mskucherawy@watmath.UWaterloo.ca (UW) UUCP: uunet!utai!lsuc!motto!murray uunet!watmath!mskucherawy ----------------------------- From: habafropzipulops <david@eng.sun.com> Subject: Re: looking for C language file differ Date: 1 Jun 90 17:57:35 GMT Sender: david@sun.eng.sun.com To: info-unix@sem.brl.mil In article <1990May31.185500.29790@cbnewsd.att.com> jlash@cbnewsd.att.com (john.k.lash) writes: >Does anyoue have or know of a "syntax tolerant" diff program for C files? Sure -- Dick Grune's "sim". It's in the comp.sources.unix archives, vol 3 and 4. -- David DiGiacomo, Sun Microsystems, Mt. View, CA david@eng.sun.com ----------------------------- From: Martin Weitzel <martin@mwtech.uucp> Subject: /dev/dsk/0p0 -> vp/ix (was Re: DOS Norton NCD under VP/ix causes panic) Keywords: ncd, norton, vpix Date: 1 Jun 90 20:50:43 GMT To: info-unix@sem.brl.mil In article <1990May31.165403.4270@esegue.segue.boston.ma.us> johnl@esegue.segue.boston.ma.us (John R. Levine) writes: >In article <505@al.ele.tue.nl> raymond@ele.tue.nl (Raymond Nijssen) writes: [about crashing unix thru disk accesses from vp/ix] >However, there is another approach you might try. The way you are getting >from vp/ix to the DOS disk is extremely convoluted: first Unix is simulating >Unix files on top of the DOS file system, then vp/ix is using simulated remote >networked DOS files on top of the simulated Unix files on the DOS file system. >vp/ix, being DOS after all, can get to the DOS file system directly. Unmount >the /dos partition and add to your vpix.cnf file a line like > >D /dev/dsk/0p0 Well, if I hear that some DOS *application* can crash my UNIX thru vp/ix, I feel *very* reluctant to give access to my complete harddisk (and to this does "/dev/dsk/0p0" refer) to vp/ix. Related question: What about security issues? Again I feel very reluctant to expose "/dev/dsk/0p0" to some untrusted program. (Well I admit, I'm a little biased against DOS and vp/ix belongs into this category, though I have it installed here.) -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83 ----------------------------- From: Martin Weitzel <martin@mwtech.uucp> Subject: _cleanup() before fork()? (was Re: How to terminate a child ...) Date: 1 Jun 90 22:57:43 GMT To: info-unix@sem.brl.mil In article <845:May2718:47:2590@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes: [dd ...] >Using fflush() before a fork() is never wrong in practice; it's the only >way to guarantee that the child can safely use stdio; and the possible >efficiency hit is miniscule compared to the fork() time. While there may >be a few exceptions, novices should learn fflush()-fork() rather than a >fork()-_exit() that will ``mysteriously'' lose output. One remark to that: Requiring (or teaching novices) to fflush() all output streams before a fork() tends to clutter up the source with unnecessary global variables or introduce many additional parameters: If the program is halfway structured chances are big that the respective FILE-pointers are not normally visible at the point were the program fork()s. It would be quite helpful if stdio had officially defined some "fflush_all()" operation - which is necessary anyway, because its implicitly called by exit(). For as much as I know the usual name of this routine is "_cleanup()", but using it - of course - is not recommendable for portable programs. BTW: I would not be surprised if someone finds it a useful idea to make fork() call _cleanup() implicitly some day, because he was burned by accidentially duplicated output. Though I would not like to see this, there have allready been worse things in this area, eg. fiddling with PATH and UID's within execv(), which has broken some clean and useful code in the attempt to provide a general fix for sloppily designed programs. -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83 ----------------------------- From: "Steinar O. Cook" <soc@dr.uucp> Subject: postprocessor for ditroff ? jetroff ? Keywords: ditroff Date: 2 Jun 90 10:05:30 GMT To: info-unix@sem.brl.mil I'm running DWB on a 386 machine with Interactive UNIX. Does anyone know of a postprocessor for ditroff which supports HP Laserjet ? Please send answers to: steinar@balder.uucp or ..!uunet!mcsun!nuug!dr!balder!steinar ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: postprocessor for ditroff ? jetroff ? Keywords: ditroff Date: 2 Jun 90 21:23:22 GMT To: info-unix@sem.brl.mil In article <648@dr.uucp> soc@dr.uucp (Steinar O. Cook) writes: >I'm running DWB on a 386 machine with Interactive UNIX. Does anyone know >of a postprocessor for ditroff which supports HP Laserjet ? The answer to this question (and zillions of others) is in the recently posted i386 Frequently asked questions. If you can't find your copy, send me email and I will forward a copy to you. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: Ralph Finch <rfinch@caldwr.water.ca.gov> Subject: Re: Why partition disks? Keywords: partition, disk, SCSI Date: 2 Jun 90 16:50:45 GMT To: info-unix@sem.brl.mil In article <3419@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>1. Each file system can have at most 65,535 inodes, because the inode >>number is stored in a 16 bit field in the directories. > >Speak for yourself. There exist versions of UNIX with more modern file >systems that have 32-bit inumbers; the original poster didn't specify >what flavor of UNIX they have, so they may or may not have a 64K inode >limitation on their file systems. It's SunOS which I assume uses the 32-bit inumbers. My thinking right now is, one of the 1.2GB drives will be divided into 2 partitions, for /home and /pub stuff; the other just 1 partition, for large files (we run numerical models which tend to generate a few large files). Most concerns expressed so far have been about administering the drives, which is valid, but right now we just want some handy scratch space, mainly. -- Ralph Finch 916-445-0088 rfinch@water.ca.gov ...ucbvax!ucdavis!caldwr!rfinch Any opinions expressed are my own; they do not represent the DWR ----------------------------- From: Qing Qi Tsao <tsao@helios.iec.ufl.edu> Subject: need help with 'curses' Date: 2 Jun 90 17:17:09 GMT Sender: news@bikini.cis.ufl.edu To: info-unix@sem.brl.mil I am goinh to use cursor addressing and screen display library:curses, and I do not have references except man pages, I will appreciate it very much if somebody can send me some information about it, including references or your experiences. I will post a summary when I have done. ----------------------------- From: Barry Shein <bzs@world.std.com> Subject: Re: Why /etc/mtab? (was: Example modification of /etc/mtab wanted) Date: 2 Jun 90 20:08:29 GMT Sender: Barry Shein <bzs@world.std.com> Followup-To: comp.unix.questions To: info-unix@sem.brl.mil >Which leads me to pose the question: > > Why does Unix use a file to store mount information? > >It seems to me that the proper way to determine what's mounted would >be to look in the kernel mount tables. It would be trivial to implement >a system call to return the information. Anyone know why the "ask the >kernel" approach was never taken? It goes way back to the early Unix days, V6 on the PDP-11 certainly had /etc/mtab. With a maximum of 64KB for the kernel you made trade-offs, one of Unix's early plus's was how much it used facilities outside the kernel to get things done. Design goals were also compelling. Of course, in this day and age it seems like a minor savings, but you could probably find dozens of things like this to put in the kernel if you looked around. The bloat would start to get real (why not store environment variables in the kernel so children can set parent processes? How about the password/group file? host tables? Heck, everything YP manages? etc etc.) There are a lot of us out there who hope the trend would be quite the other way, more for design reasons than memory concerns. Things in the kernel tend to quickly become immutable in various ways. Putting things in the kernel tends to make innovation impossible unless you're a kernel hacker (and have the sources, time and energy.) Just changing, e.g., the way a few fields in a text file are handled is not very hard if you wanted to extend mount table semantics. What you really want is just a putmountent() library to hide the details of the service, not to redesign Unix to make it easier to write that one library call. -- -Barry Shein Software Tool & Die | {xylogics,uunet}!world!bzs | bzs@world.std.com Purveyors to the Trade | Voice: 617-739-0202 | Login: 617-739-WRLD ----------------------------- From: "Kevin D. Quitt" <kdq@demott.com> Subject: Can the output to a terminal be monitored? Date: 2 Jun 90 21:06:31 GMT To: info-unix@sem.brl.mil Is there a way that I (as root) can "tap into" a user to monitor terminal activity? I specifcally would like to do this for the modem line. -- _ Kevin D. Quitt Manager, Software Development 34 12 N 118 27 W DeMott Electronics Co. 14707 Keswick St. Van Nuys, CA 91405-1266 VOICE (818) 988-4975 FAX (818) 997-1190 MODEM (818) 997-4496 Telebit PEP last demott!kdq kdq@demott.com 96.37% of the statistics used in arguments are made up. ----------------------------- From: "Conor P. Cahill" <cpcahil@virtech.uucp> Subject: Re: Can the output to a terminal be monitored? Date: 3 Jun 90 01:11:11 GMT To: info-unix@sem.brl.mil In article <270@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: > Is there a way that I (as root) can "tap into" a user to monitor >terminal activity? I specifcally would like to do this for the modem line. Not in software (unless you modify the software running on that port to dump the data to a log file that you tail). If what you want to do is to be able to abitrarily "tap" into a data line you must do it with hardware. This can be done in several ways including 1. a data line analyzer that captures all the data 2. a poor-mans data capture which uses a second serial port on your system and a special cable that wires TXD from the modem port to RXD on the second serial port. You can then tail this serial port whenever you want. Be sure that you do not have a getty running on the port and that if the second port requires DCD to be high you should loop DTR back to DCD. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170 ----------------------------- From: Bill Irwin <bill@twg.uucp> Subject: Re: Can the output to a terminal be monitored? Date: 3 Jun 90 03:46:14 GMT Expires: Sender: Followup-To: Keywords: To: info-unix@sem.brl.mil In article <270@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: > > Is there a way that I (as root) can "tap into" a user to monitor >terminal activity? I specifcally would like to do this for the modem line. I have had some success using the "tee" process. In the user's .profile, when it got to the place where the local menu system was going to be brought up, I modified it to read: menu | tee > .../.monitor This basically pumps all screen I/O from that point on into the ".monitor" file. If you use append (">>"), each session will be appended to the end of the file. The tricky part is that all escape sequences sent to the terminal are captured in the file. If you do a "cat .monitor", you will see a very fast version of the user's session (fast because any time the user spent thinking or looking at the screen will not be reflected in your viewing session), as though you were looking over their shoulder. But you need to view with the same terminal type that the user used, so that your terminal responds properly to the escape sequences fed to it from .monitor. In my experience, as soon as the user entered an application that put the terminal into "raw" mode, output into .monitor was suspended until they exited the application and became "cooked" again. This was frustrating. Kind of like following a lady spy and watching her go into the ladies room. You have to hang around outside waiting for her to out. How knows what secrets she passed on while she was in there! Also, I found that vi sessions didn't behave properly for the user being monitored. You loose the advantage of secrecy if the user knows (or suspects) they are being observed. I would be very interested in reading some responses that would suggest a solution to the vi and raw mode problems. -- Bill Irwin - TWG The Westrheim Group - Vancouver, BC, Canada ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uunet!van-bc!twg!bill (604) 431-9600 (voice) | UNIX Systems Bill.Irwin@twg.bc.ca (604) 431-4629 (fax) | Integration ----------------------------- From: Weil timothy <trw@aplcen.apl.jhu.edu> Subject: 'ghost' entries in directory Keywords: 'ghost entry', directory Date: 2 Jun 90 22:59:51 GMT To: info-unix@sem.brl.mil This is probably a common UNIX question the answer to which I've never seen - A bundled file is sent to a user with instructions to 'sh <file...>' which in the process makes directories and unpacks files... However, the 'mkdir <somedir>' fails (dont know why) & I'm left with unbundled files in my current directory... Problem -> the 'mkdir <somedir>' command did create a directory entry in '.' (current directory) BUT this new directory cannot be entered (via cd <somedir>) or recognized for deletion (rmdir <somedir> yields the error, 'directory does not exist'. What next? The <somedir> entry exists via 'ls -l' & I've tried changing owner, access rights, etc. Thanks in advance for any suggestions here... ----------------------------- From: Muhammad Farrukh Khan <khan@cs.purdue.edu> Subject: Lunar calenders Date: 3 Jun 90 02:15:41 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil Is there any command on UNIX systems which will give both solar and lunar calenders? I have once seen such a printout in the printer room. If not, is there a public domain program to give lunar dates? Thanks! ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@ecf.ncsl.nist.gov (SMTP MAILER) (08/11/90)
----Reason for mail failure follows---- Sending mail to host ecf.ncsl.nist.gov : Fatal reply code to command 'RCPT TO:<ise.ncsl.nist.gov@ecf.ncsl.nist.gov>': 550 User "ise.ncsl.nist.gov" Unknown. ----Transcript of message follows---- Date: 11 Aug 90 06:51:00 EST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#113 To: "ise.ncsl.nist.gov" <ise.ncsl.nist.gov@ecf.ncsl.nist.gov> Return-Path: <unixinfo-request@ecf.ncsl.nist.gov> Received: from SEM.BRL.MIL by ecf.ncsl.nist.gov with SMTP ; Sat, 11 Aug 90 06:50:33 EST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab03279; 11 Aug 90 5:58 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa03263; 11 Aug 90 5:46 EDT Date: Sat, 11 Aug 90 05:45:48 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#113 Message-ID: <9008110546.aa03263@SEM.BRL.MIL> INFO-UNIX Digest Sat, 11 Aug 1990 V10#113 Today's Topics: book request, want advice Re: book request, want advice Re: reliable reads from pipes Re: Foo Bar Re: KSH recommendations? Re: how to use diff files? Re: ftp in background? Using Lex (and Yacc) on a string. Re: Using Lex (and Yacc) on a string. Need program to attach a pseudo tty to tcp/ip port Re: Get process name w/o using argv[0] in C function? Re:In defense of Larry WAS What's wrong with this Bourne shell script? Re: ksh question: what's the difference between [ ... ] and [[ ... ]] ? Re: Working with sed Needed: "user friendly" batch job scheduler article "Get Ready for GNU Software" in Computer World magazine Re: Suid script security SUMMARY: finding disk usage of partitions HP-UX 7.0 problems with ps(1) and awk(1) in pipe rexecd for ESIX? Re: help sought - securing a terminal/line Re: C-shell programming Re: How to tell if a process exists make's usage of VPATH Re: Printer Accounting File Parsing Re: backing up an entire unix/xenix system AWK Language Question permissions and parameters on terminal line Emacs Demented question -- anyone retargeted yacc for nawk? Timeout on shell command. ----------------------------------------------------------------- From: Asmodeus <dodgeT@batman.moravian.edu> Subject: book request, want advice Keywords: unix books, non-trivial Date: 1 Aug 90 06:26:50 GMT To: info-unix@sem.brl.mil I would like the net's advice on (a) good book(s) concerning the non-trivial aspects of unix. I am already familiar w/many of the commands...that is not a problem...what i want is a book that details and explains many of the unix features that separate it from the smaller operating systems. Ex.-> devices, virtual memory, perl, other various shells...basically a good book that doesn't spend too much time explaining every line-editor and vi to me...tell me something interesting... thanx -- Timothy Dodge Bernhardt 207 ,Box 134, Moravian College, Bethlehem PA 18018 ------------ CSNET/INTERNET....dodgeT@moravian.edu ___________________ |The keeper of| UUCP......!rutgers!liberty!batman!dodgeT_|I would if i could |strange hours| In Bill Gates I Trust | i can't so i won't ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: book request, want advice Keywords: unix books, non-trivial Date: 10 Aug 90 21:52:37 GMT To: info-unix@sem.brl.mil In article <1900@batman.moravian.EDU> dodgeT@batman.moravian.EDU (Asmodeus) writes: - I would like the net's advice on (a) good book(s) concerning -the non-trivial aspects of unix. I am already familiar w/many of the -commands...that is not a problem...what i want is a book that -details and explains many of the unix features that separate it from -the smaller operating systems. Ex.-> devices, virtual memory, perl, -other various shells...basically a good book that doesn't spend too much -time explaining every line-editor and vi to me...tell me something -interesting... Libes & Ressler, "Life With UNIX", would probably tell you much of what you want to know, but only at a survey level. For details you have to dig into lots of places. ----------------------------- From: Andrew Hume <andrew@alice.uucp> Subject: Re: reliable reads from pipes Date: 7 Aug 90 05:35:02 GMT To: info-unix@sem.brl.mil lest anyone start relying on reads returning whatever is in the pipe, 9th edition and later unices preserved the size of the writes which can now also exceed the size of the pipe buffer (i think). ----------------------------- From: "Karen C. Pichnarczyk" <karyn@nssdca.gsfc.nasa.gov> Subject: Re: Foo Bar Date: 8 Aug 90 18:31:37 GMT Sender: news@dftsrv.gsfc.nasa.gov To: info-unix@sem.brl.mil Foo Bar is derived from the abbreviation FUBAR: F: American English colloquialism for 'messed', or 'destroyed' ('nice' people don't use this language) U: Up B: Beyond A: All R: Recognition Karyn ***disclaimer: insert standard disclaimer here ----------------------------- From: Fredrik Stax{ng <fredriks@kuling.uucp> Subject: Re: KSH recommendations? Date: 9 Aug 90 18:58:48 GMT To: info-unix@sem.brl.mil In article <1990Aug08.113542.13266@iti.uucp> todd@iti.UUCP (maroC ddoT) writes: >In article <LARRY.90Aug7135159@focsys.uucp> larry@focsys.uucp (Larry Williamson) writes: >>I'd like to purchase a copy of the korn shell for ISC's Unix 2.2. >If you can't find a cheap korn shell, you may want to consider looking into >GNU's BASH (Bourne Again SHell). It has a lot of nice features that make the >korn shell worth while (including emacs & vi style command history editing). >Best of all.... it's free. And it works on 2.2. I got it up about a week ago. >Since ISC just added job control (to 2.2) you may want to keep in mind that >any korn shell compiled for an earlier ISC probally will not support any >job control. I have not tried to get job control to work yet. There is a bug in 2.2 that bit me. POSIX-compliant mode survives exec, so I had to put in a call to _setostype(0) before the exec. Also wait() in nojobs.c needed to be changed to waitpid(). Compile with -Xp. -- Fredrik Stax{ng | Unix is the last operating system. Any CS Student@Uppsala University | new will be strictly in the Unix tradition. fredriks@kuling.docs.uu.se | (+46 18) 46 32 07 | ----------------------------- From: Dennis Glatting <dennisg@kgw2.bwi.wec.com> Subject: Re: how to use diff files? Date: 9 Aug 90 19:53:36 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <2044.26b890a2@miavx1.acs.muohio.edu> dastrout@miavx1.acs.muohio.edu (root@next1) writes: >This may be a silly question, but how do diff files work? specifically, >I want to upgrade g++ from 1.37.0 to 1.37.1. I ftp'ed the diff file, but >can't seem to get it to work. I tried ( cat fname.diff ; echo w) | ed >but that doesn't go. I would appreciate the responses, and will send a >summary to be included in the next Freq. Asked Q's. > there is a program called "patch". you can get it from uunet or osu. From adnan@sgtech.UUCP Fri Dec 1 05:38:51 1989 Path: kgw2!spca6!uccba!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!hal!ncoast!sgtech!adnan From: adnan@sgtech.UUCP (Adnan Yaqub) Newsgroups: comp.sources.wanted Subject: osu-cis Archive [was Re: pathalias] Summary: Try the osu-cis archive for all your software needs. Message-ID: <ADNAN.89Dec1103851@sgtech.UUCP> Date: 1 Dec 89 10:38:51 GMT References: <5006@quack.UUCP> Sender: adnan@sgtech.UUCP Distribution: comp Organization: Star Gate Technologies, Inc. Lines: 96 In-reply-to: mrapple@quack.UUCP's message of 29 Nov 89 23:01:43 GMT In article <5006@quack.UUCP> mrapple@quack.UUCP (Nick Sayer) writes: I don't know if this is the proper way to ask, but if it is, how can I get a copy of the pathalias program? Thanks in advance for any assistance. [I am doing a followup because the answer may help a lot of people.] There is an anonymous UUCP archive called osu-cis which has pathalias along with lots of other stuff (including the GNU software). Here is their "how to get" file (edited to save space). Call them up and grab your own copy of GNU.how-to-get. It will tell you how to get pathalias. I also recommend looking at their ls-lR.Z file. ----- -rw-rw-r-- 1 karl 28633 Nov 20 08:57 GNU.how-to-get This file (osu-cis!~/GNU.how-to-get) describes how to get the following software from osu-cis via semi-anonymous UUCP: C++ Test Suite Compress ET++ GNU /bin Utilities GNU Assembler GNU Awk GNU Bash GNU Bison GNU C++ Compiler GNU C++ Library GNU C Compiler GNU Chess GNU DBM GNU Debugger GNU Diff GNU Emacs GNU Emacs Ada support GNU Emacs Franz interface GNU Emacs Lisp Manual GNU Go GNU Gperf & Cperf GNU Grep GNU Indent GNU Lex GNU Make GNU Pins & Art GNU Plot & Plot2PS GNU Sed GNU Tar GNUS Ghostscript Gnews Ispell JOVE KA9Q Kermit Leif MIT C Scheme Mg2a NNTP News Oops PCRRN Patch Pathalias Protoize Proxy ARP RCS RFCs & IDEAS SB Prolog STDWIN Sendmail Smail Tcsh VM There's a lot of other available miscellany that isn't explicitly listed here. You can find out about it in the file osu-cis!~/ls-lR.Z The Computer and Information Science Department of the Ohio State University provides Free Software Foundation GNU products (and others) via UUCP only as a redistribution service. Anything found here is only and exactly as it would be found on the indicated Internet hosts, were one to acquire it via anonymous FTP (like we did); or else saved it as it flowed past on the Usenet source distribution newsgroups. OSU CIS takes no responsibility for the contents of any of the distributions described in this message. See the Distribution document (emacs/etc/DISTRIB when you unpack and build Emacs) and the GNU Emacs General Public License (emacs/etc/COPYING, similarly). Much of the GNU software is in beta-test. For a list of the current statuses (stati?), ask gnu@prep.ai.mit.edu for a copy of the latest FSF order form. How to reach osu-cis via uucp =============================== Here is a set of L.sys or Systems file lines suitable for osu-cis: # # Direct Trailblazer # osu-cis Any ACU 19200 1-614-292-5112 in:--in:--in: Uanon # # Direct V.32 (MNP 4) # osu-cis Any ACU 9600 1-614-292-1153 in:--in:--in: Uanon # # Micom port selector, at 1200, 2400, or 9600 bps. # Replace ##'s below with 12, 24, or 96 (both speed and phone number). # NOTE: 9600 bps Micom access may not yet be operational, or may be flaky. # osu-cis Any ACU ##00 1-614-292-31## "" \r\c Name? osu-cis nected \c GO \d\r\d\r\d\r in:--in:--in: Uanon Modify as appropriate for your site, of course, to deal with your local telephone system. There are no limitations concerning the hours of the day you may call. We are deeply grateful to Philips Components of Eindhoven, the Netherlands for the donation of a Trailblazer Plus and a Codex 2264 for use by the community at large. Where the files are =================== Most items exist on osu-cis for distribution purposes in compressed tar form, exactly what you find on the indicated hosts in the specified origin files. Most items are cut into pieces for the sake of uucp sanity. This separation helps if your uucp session fails midway through a conversation; you need restart only with the part that failed, rather than the whole beast. The pieces are typically named with a root word, followed by letter pairs like "aa" and "bj," meaning that the pieces are all named with the root word, followed by a dash and the suffixes indicated, using the letters inclusive between the two limits. All pieces but the last are 100,000 bytes long, and the fragmentary last piece has some smaller size. ----- -- Adnan Yaqub Star Gate Technologies, 29300 Aurora Rd., Solon, OH, USA, +1 216 349 1860 ...cwjcc!ncoast!sgtech!adnan ...uunet!abvax!sgtech!adnan -- -- dennisg@kgw2.bwi.WEC.COM | Dennis P. Glatting ..!uunet!tron!kgw2!dennisg | ----------------------------- From: skidrow@ceres.ucsc.edu Subject: Re: ftp in background? Keywords: ftp, background Date: 9 Aug 90 20:33:38 GMT Sender: usenet@darkstar.ucsc.edu To: info-unix@sem.brl.mil masticol@athos.rutgers.edu (Steve Masticola) writes: >I would like to ftp in several files from a remote site (using >anonymous ftp). The site is busy during most daylight hours, and even >when I can connect, the connection has been unreliable. Is there any >utility that can transfer files in background, and will retry on a >broken or uncompleted connection? >Thanks for your help, >- Steve (masticol@athos.rutgers.edu) Annette DeSchon has written a background FTP utility (BFTP) which you can use to repeatedly attempt to copy files over the net. BFTP features session logging to record errors, verification of transfer parameters prior to copying, and many other useful features. Really handy for connecting to ftp-servers in obscure foreign places, or overloaded servers with time/user limits. Available at gatekeeper.dec.com (pub/net) and most other PD-sites. There's an RFC that covers it. - Gary M. Lin skidrow@ceres.ucsc.edu ----------------------------- From: John Lacey <john@basho.uucp> Subject: Using Lex (and Yacc) on a string. Date: 10 Aug 90 01:29:27 GMT To: info-unix@sem.brl.mil Normally, of course, one wants a scanner (and a parser) to work from a file, perhaps stdin. Sigh. Well, I want one that works from a string. I am using Flex 2.3, and Bison 1.11. I tried the following few #define's: #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ { \ for ( result = 0; *ch_this && result < max_size; result ++ ) \ buf[result] = *ch_this++; \ } #define YY_USER_INIT \ if ( scan_init ) { \ if ( yy_flex_debug ) \ printf ( "-- initializing for scan %d\n", scan_init ); \ ch_this = inbuffer; \ scan_init = 0; } with the following couple of definitions and declarations in the scanner: static char * ch_this; extern char * inbuffer; extern int scan_init; and with inbuffer and scan_init defined in the code that calls yyparse(). This didn't work. Well, actually, it works the first time yyparse() is called, but not again. Now, YY_USER_INIT is used inside an if statement that checks yy_init, so I moved it out of there in the scanner skeleton so that YY_USER_INIT is seen every time the scanner is called. Still no go. Has anyone done this, or see a way to do it, or know a way to do it, or .... Thanks. -- John Lacey, E-mail: ...!osu-cis!n8emr!uncle!basho!john (coming soon: john@basho.uucp) V-mail: (614) 436--3773, or 487--8570 "What was the name of the dog on Rin-tin-tin?" --Mickey Rivers, ex-Yankee CF ----------------------------- From: Pat Broderick <ptb@ittc.wec.com> Subject: Re: Using Lex (and Yacc) on a string. Date: 10 Aug 90 14:41:51 GMT Followup-To: comp.lang.c To: info-unix@sem.brl.mil In article <1990Aug10.012927.5558@basho.uucp>, john@basho.uucp (John Lacey) writes: > Normally, of course, one wants a scanner (and a parser) to work from > a file, perhaps stdin. Sigh. Well, I want one that works from a string. > ... Recently I had occasion to do something similar. What we did was roughly as follows: - strings to be parsed are maintained in memory - to parse a string a global pointer known to lex is set to point at the beginning of the string - the input() macro was redefined in terms of this pointer (standard uses getc(yyin)) The things needed might look something like: LEX: # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) /* standard defn from lex */ # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):(*yynyy++))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar) ^^^^^^^^^^ /* modified defn to use string */ extern char *yynyy; /* will pt to start of string */ Function invoking parser: char *yynyy; /* globally visible */ .... yynyy = start_of_string; yyparse(); This works fine for us, hope it helps. -- Patrick T. Broderick |ptb@ittc.wec.com | |uunet!ittc!ptb | |(412)733-6265 | ----------------------------- From: Lawrence Harris <lawrence@nvanbc.uucp> Subject: Need program to attach a pseudo tty to tcp/ip port Keywords: pty tcp/ip Date: 10 Aug 90 06:37:59 GMT To: info-unix@sem.brl.mil I have an emulex terminal server and want to be able to put a modem on one of the server ports. I have been able to put a printer on a port using a custom print filter that opens a tcp connection the the port and then copies standard in. What I need is a program that will attach itself between a pseudo tty and the terminal server port so that I can use 'cu' or 'kermit' to talk to the modem. This sound like something that should have been done before so I thought I would ask if some kind soul would send me a program that either will do the trick or act as an example. Thanks, Lawrence Harris ps. The system is running XENIX 386. ---------- UUCP: ubc-cs!van-bc!nvanbc!lawrence (home) ...!nvanbc!hcs!lharris (work) MAIL: 100 13511 Commerce Parkway, Richmond, B.C., Canada, V6V 2J8 PHONE: (604) 420-9518 (home), 273-490 (work), 273-2764 (fax) ----------------------------- From: "Jay A. Konigsberg" <jak@sactoh0.uucp> Subject: Re: Get process name w/o using argv[0] in C function? Date: 10 Aug 90 12:02:34 GMT To: info-unix@sem.brl.mil In article <837@hls0.hls.oz> george@hls0.hls.oz (George Turczynski) writes: >In article <13491@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >> In article <1990Aug4.051827.16438@nbc1.ge.com> scott@nbc1.GE.COM (Scott Barman) writes: >> >I cannot think of one rational or even irrational reason *not* to use >> >global variables. >> >> Really? I thought this was commonly taught in structured software development >> courses. > >Yes, it is, as a principle, to discourage people from using >globals and no locals, as they might have gotten used to with >such things as BASIC. It develops the ideas of information >hiding and so on. > >The use of NO globals is however, only adopted by extremists. > Yes, this is correct. In fact, there are some cases where the only way to do something is *with* globals - though these situtations are rare, they do exist. Also, there are times when you want something to be global to a set of functions. For example the getch() & ungetch() functions in K&R where the buf[] and bufp vars are shared. Another case where globals are required involves the use of a signal catcher() routine. If this routine needs information other than the signal number, the only way to get it there is via a global (when invoked by catching the signal that is). The case where I used this was returning from "raw" to "cooked" char mode. The catcher() routine had to reset ICANON and a couple of termio.??? values to their original form. Accucally, if things like globals and the neferious "goto" were really _that_ bad, they wouldn't be included in the language. The fact of the matter is though, sometimes they are needed. Just have good and supportable reasons for using them. -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, its worth doing correctly. ----------------------------- From: "BURNS,JIM" <gt0178a@prism.gatech.edu> Subject: Re: Get process name w/o using argv[0] in C function? Date: 11 Aug 90 02:34:58 GMT To: info-unix@sem.brl.mil in various articles by (Jay A. Konigsberg),(George Turczynski),(Doug Gwyn), & (Scott Barman): >>> >I cannot think of one rational or even irrational reason *not* to use >>> >global variables. >>> Really? I thought this was commonly taught in structured software development >>> courses. >>Yes, it is, as a principle, to discourage people from using >>globals and no locals, as they might have gotten used to with >>such things as BASIC. It develops the ideas of information >>hiding and so on. >>The use of NO globals is however, only adopted by extremists. > Yes, this is correct. [Discussion in defense of globals in certain cases.] I understood the current emphasis was on not MODIFYING globals in subroutines, as this is a side-effect, and can be hard to debug for future code maintainers, unless the usage of globals is carefully documented in comments sections. It's much cleaner to pass a global as a parameter than to let subs modify them (& some say even to access them, since later programmers may say "Well, I'm using it anyway - Why can't i modify it?"), since it's more obvious you intended for the sub to have access to the variable. The only time it is critical that subs not reference globals (other than system globals such as errno) is in canned library packages, which can't 1) be dependent on the proper global environment being correctly setup, and 2) use global names internally that may collide with global names you have defined. Of course, the classic text-book example on using globals for information hiding is in writing massage routines for a small internal database. All you want to do is pass the data/key to be operated on, and the operation itself. You do NOT want to pass around the data structures for the database itself, so that the massagers will be free to change the implementation when database growth demands a reorganization of data or access method. (If you pass n arrays as the database in every call to the massage routines, you have to track down every one of those calls if the database structure changes.) '#include'-ing the appropriate set of global 'extern's in only the massage routines hides the database structure from the rest of the program. And then you have (SysV) Fortran programmers like me that are working on parent/child programs (some 78 in my system) where the only efficient solution to data sharing is some sort of IPC. I'm defining my COMMON to be in shared memory (HP-UX). -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: Patrick Hertel <afsipmh@cid.aes.doe.ca> Subject: Re:In defense of Larry WAS What's wrong with this Bourne shell script? Date: 10 Aug 90 12:43:55 GMT To: info-unix@sem.brl.mil In sum the argument is that when someone asks for a solution to a Bourne problem the answer should be Bourne. While I would agree in the case where the reply was made throgh e-mail a posting is also for the edification of the unwashed and alternate solutions should certainly be welcome. I see no purpose, within reason, in limiting replies. I apologize for a posting which is not really appropriate to this forum, I don't want to start a debate and detract from this newsgroup's real purpose. -- Pat Hertel Canadian Meteorological Centre Analyst/Programmer 2121 N. Service Rd. phertel@cmc.aes.doe.ca Dorval,Quebec Environment Canada CANADA H9P1J3 ----------------------------- From: Eduardo Krell <ekrell@ulysses.att.com> Subject: Re: ksh question: what's the difference between [ ... ] and [[ ... ]] ? Keywords: ksh Date: 10 Aug 90 13:54:12 GMT Sender: netnews@ulysses.att.com To: info-unix@sem.brl.mil Answer from Dave Korn: The primary difference between [ and [[ is that [ is a command (equivalent to the test command), whereas [[ is part of the shell grammar. There are a few minor differences as well. In particular, [ uses -a and -o for and and or, whereas [[ uses && and || for this. Because [ is a command, all shell expansions are performed before the [ command is executed. The only way to distinguish between operators and operands is by the results of expansions. For example, [ "$1" ] can have several meanings that depend of the value of $1. If $1 is -t, then this is a test for a terminal. If $1 is of the form, -<letter>, where letter is one of the unary operators that require an operand, then this is an error. Otherwise, this evaluates to true when the string is not null. Note that the use of double quotes is critical with [ since otherwise it need not expand to a single argument which leads to unexpected results. There are many other anomalies with [. Here are a few: 1. To test string variables you have to precede the variable with a character that is not a - to prevent it being interpreted as an operator. 2. [ -f * ] tests the first file name and ignores the rest, unless the second name is -a, -o, or a binary operator such as =. 3. [ -f "$1" ] yields a syntax error when $1 is =. The [[...]] construct was added to ksh88 to overcome these problems. Since [[...]] is part of the shell, it can differenciate between operators and operands before expansion. (This means that the operators cannot be variable unless you use eval). In addition, word splitting and file name expansion are not performed inside [[...]] eliminating many of the most common scripting errors. Because no file expansion is done, pattern characters (*,? and [) can be used for string comparison. The [[...]] construct was in draft 8 of the IEEE 1003.2 shell and utilities standard, but was removed from draft 9 because it was felt that some of these problems could be fixed by eliminating compound operations, -a, -o, !, and () in test ([) from the standard and requiring that -t require an operand. The number of arguments could then determine which argument was an operator. Writing a compound command would requiring the use the && and || of the shell instead. The ! command was added to the shell grammar for this purpose. Unfortunately, there was no coordination between changes in test and the shell language so that the changes in test were never made and the [[...]] was not restored. Therefore, unless there is a change in future version of the standard, the [[...]] will remain a KornShell extension rather than part of the POSIX shell language. David Korn ulysses!dgk Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com ----------------------------- From: Chris Davies <chris@vision.uucp> Subject: Re: Working with sed Date: 10 Aug 90 14:23:41 GMT To: info-unix@sem.brl.mil In article <27372@unix.cis.pitt.edu> nr3m@unix.cis.pitt.edu (Matthew A Henry) writes: >I'm writing a script that uses sed, I'm assuming by this that you don't mean 'working with a sed script'. >and am having trouble with one >part. I have a file that contains typical unix paths, one per >line, and would like to remove everything after the last forward >slash (/). Why use sed? You've said you're using a script with sed in it, so why not use something different. On SysV and SunOS 4.0.3_EXPORT (therefore probably BSD systems in general??) you can use _d_i_r_n_a_m_e to do exactly what you require. >In other words I would like the string: > /aaa/bbb/ccc/ddd/eee >to be changed to: > /aaa/bbb/ccc/ddd Check out _b_a_s_e_n_a_m_e too. Thus, % dirname '/aaa/bbb/ccc/ddd/eee' /aaa/bbb/ccc/ddd/eee % basename '/aaa/bbb/ccc/ddd/eee' eee % Chris -- VISIONWARE LTD | UK: chris@vision.uucp JANET: chris%vision.uucp@ukc 57 Cardigan Lane | US: chris@vware.mn.org OTHER: chris@vision.co.uk LEEDS LS4 2LE | BANGNET: ...{backbone}!ukc!vision!chris England | VOICE: +44 532 788858 FAX: +44 532 304676 -------------- "VisionWare: The home of DOS/UNIX/X integration" -------------- ----------------------------- From: David Neill-OKCy Mktg 405-278-4007 <dwn@swbatl.sbc.com> Subject: Re: Working with sed Date: 10 Aug 90 17:43:33 GMT To: info-unix@sem.brl.mil >In article <27372@unix.cis.pitt.edu> nr3m@unix.cis.pitt.edu (Matthew A Henry) writes: >I'm writing a script that uses sed, >and am having trouble with one >part. I have a file that contains typical unix paths, one per >line, and would like to remove everything after the last forward >slash (/). sed -e 's/\/[^\/]*$//' filename -- name & address (this account) -> uunet!swbatl!dwn OR dwn@swbatl.sbc.com David Neill office -> 405-291-1990 -> uunet!swbatl!oktext!mktco Mgr - Mktg.(SWBTCo) home -> 405-749-1141 -> uunet!swbatl!oktext!frodo!david ----------------------------- From: David Davison <david@slammer.uucp> Subject: Needed: "user friendly" batch job scheduler Keywords: batch job Date: 10 Aug 90 15:15:07 GMT To: info-unix@sem.brl.mil I have a need for a batch job scheduler that I can allow unsophisticated users to use. Menu driven would be great, fairly bulletproof, load leveling by time of day would be wonderful. Any suggestions would be appreciated. Environment is Sequent S81(2), unisys 6000 (20), harrix hcx(3). Please email replies to david@slammer.UUCP ...!gatech!bagend!slammer!david Standard disclaimers. ----------------------------- From: Dan_Jacobson@att.com Subject: article "Get Ready for GNU Software" in Computer World magazine Date: 10 Aug 90 16:21:42 GMT Sender: Dan Jacobson <danj1@cbnewse.att.com> Followup-To: gnu.misc.discuss To: info-unix@sem.brl.mil There's a 1/2 page article "Get Ready for GNU Software," in Computer World magazine, Aug. 6, 1990, page 102, by Simson L. Garfinkel. Quotes: "...Stallman, who by many accounts may be the world's best programmer." "...GNU Emacs, is becoming the standard Unix programmer's editor." "...Stallman was awarded a $240,000 ``Genius Grant'' from the MacArthur Foundation." -- Dan_Jacobson@ATT.COM +1-708-979-6364 ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Suid script security Date: 10 Aug 90 16:34:52 GMT Sender: news@cs.vu.nl To: info-unix@sem.brl.mil In article <14920003@hpdmd48.boi.hp.com>, markw@hpdmd48.boi.hp.com (Mark Wolfe) writes: )... ) 1) Just what are the security risks involved? (i.e. how would someone attack ) a system via one of these). See below. ) 2) What can I do to make this as secure as possible? Convert it to a C program or use the indir(1) package I wrote (or something equivalent). It's in one of the latest volumes in comp.sources.unix. ------------------------------------------------------------------------------- Setuid Shell Scripts -------------------- how to get them safe Maarten Litmaath (maart@cs.vu.nl) Consider a setuid root shell script written in Bourne shell command language and called `/bin/powerful'. The first line of the script will be (without indentation!): #!/bin/sh If it doesn't begin with such a line, it's no use to chmod it to 6755 or whatever, because in that case it's just a shell script of the `old' kind: the Bourne shell receives an exec format error when trying to execute it, and decides it must be a shell script, so it forks a subshell with the script name as argument, to indicate from which file the commands are to be read. Shell scripts of the `new' kind are treated as follows: the kernel discovers the magic number `#!' and tries to execute the command interpreter pointed out, which may be followed in the script by 1 argument. Before the exec of the interpreter the uid and gid fields somewhere in the user structure of the process are filled in. Setuid script scheme (kernel manipulations faked by C routines): execl("/bin/powerful", "powerful", (char *) 0); | V setuid(0); setgid(0); /* possibly */ execl("/bin/sh", "sh", "/bin/powerful", (char *) 0); Now, what if the name of the very shell script were e.g. "-i"? Wouldn't that give a nice exec? execl("/bin/sh", "sh", "-i", (char *) 0); So link the script to a file named "-i", and voila! Yes, one needs write permission somewhere on the same device, if one's operating system doesn't support symbolic links. What about the csh command interpreter? Well, 4.2BSD provides us with a csh which has a NEW option: "-b"! Its goal is to avoid just the thing described above: the mnemonic for `b' is `break'; this option prevents following arguments of an exec of /bin/csh from being interpreted as options... The csh refuses to run a setuid shell script unless the option is present... Scheme: #!/bin/csh -b ... execl("-i", "unimportant", (char *) 0); | V setuid(0); setgid(0); execl("/bin/csh", "csh", "-b", "-i", (char *) 0); And indeed the contents of the file "-i" are executed! However, there's still another bug hidden, albeit not for long! What if I could `get between' the setuid()/setgid() and the open() of the command file by the command interpreter? In that case I could unlink() my link to the setuid shell script, and quickly link() some other shell script into its place, couldn't I? Right. Yet another source of trouble for /bin/sh setuid scripts is the reputed IFS shell variable. Of course there's also the PATH variable, which might cause problems. However, one can circumvent these 2 jokers easily. A solution to the link()/unlink() problems would be the specification of the full path of the script in the script itself: #!/bin/sh /etc/setuid_script shift # remove the `extra' argument ... Some objections: 1) currently the total length of shell + argument mustn't exceed 32 chars (easily fixed); 2) 4.[23]BSD csh is expecting a `-b' flag as the first argument, instead of the full path (easily fixed); 3) the interpreter gets an extra argument; 4) the difficulty of maintaining setuid shell scripts increases - if one moves a script, one shouldn't forget to edit it... - editing in turn could turn off the setuid bits, so one shouldn't forget to chmod(1) the file `back'... - conceptually the solution above isn't `elegant'. How does indir(1) tackle the problems? The script to be executed will look like: #!/bin/indir -u #?/bin/sh /etc/setuid_script ... Indir(1) will try to open the script and read the `#?' line indicating the real interpreter and a safe (absolute) pathname of the script. But remember: the link to the script might have been quickly replaced with a link to another script, i.e. how can we trust this `#?' line? Answer: if and only if the file we're reading from is SETUID (setgid) to the EFFECTIVE uid (gid) of the process, AND it's accessible and executable for the REAL uid (gid), we know we're executing the original script (to be 100% correct: the original link might have been replaced with a link to ANOTHER accessible and executable setuid (setgid) script of the same owner (group) -> merely a waste of time). To check the condition stated above reliably, we use fstat(2) on the file descriptor we're reading from, and stat(2) on the associated file name. We compare inode and device numbers to make sure we're talking about the same file. Can you figure out why using stat(2) alone would be insecure? Feature: we always check if the REAL uid (gid) has access to the setuid (setgid) script, even if the effective id already differed from the real id BEFORE the script was executed. (There isn't even a way to find out the original effective id.) If you want the original effective id to be used, you should set the real id accordingly before executing the script. To deal with IFS, PATH and other environment problems, indir(1) resets the environment to a simple default: PATH=/bin:/usr/bin:/usr/ucb When you need e.g. $HOME, you should get it from /etc/passwd instead of trusting what the environment says. Of course with indir(1) problem 4 remains. -------- -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Vicki Brown <vlb@magic.apple.com> Subject: Re: Suid script security Date: 10 Aug 90 19:41:32 GMT Sender: usenet@apple.com Sender: To: info-unix@sem.brl.mil In article <14920003@hpdmd48.boi.hp.com> markw@hpdmd48.boi.hp.com (Mark Wolfe) writes: > > I know that suid scripts are a bad idea from reading comp.questions and >comp.wizards over the last year or so. It seems that just about every guru >in the world has posted a warning NOT to do it, so I decided I would follow >the advice (it's a rare subject that all guru's agree on). However, it appears >that I'm now about to have one of these ugly animals forced on me from above, >so I'd like some advice: > > 1) Just what are the security risks involved? (i.e. how would someone attack > a system via one of these). > > 2) What can I do to make this as secure as possible? Warning - very long response ahead. Proceed at your own risk. <FF> There was a very interesting paper in the USENIX Association's publication, ;login: ( "How To Write a Setuid Program", Matt Bishop, ;login: Vol 12, Number 1, January/February 1987). An excerpt: Some versions of UNIX allow command scripts, such as shell scripts, to be made setuid ... Unfortunately, given the power and complexity of many command interpreters, it is often possible to force them to perform actions which were not intended, and which allow the user to violate system security. This leaves the owner of the setuid script open to a devastating attack. In general, such scripts should be avoided. ... suppose a site has a setuid script of sh commands. An attacker simply executes the script in such a way that the shell ... appears to have been invoked by a person logging in. UNIX applies the setuid bit on the script to the shell, and ... it becomes interactive... One way to avoid having a setuid script is to turn off the setuid bit on the script, and ... use a setuid [binary] program to invoke it. This program should take care to call the command interpreter by its full path name, and reset environment information such as file descriptors and environment variables to a known state. However, this method should be used only as a last resort and as a temporary measure, since with many command interpreters it is possible even under these conditions to force them to take undesirable action. The biggest problem with shell scripts is that you (the programmer / administrator) have very little control over the programs which run within the script. As a very real example, I ran across a script which allowed users to enter bug reports, using the "vi" editor. The script was setuid root, because it wanted to save files in funny places. The programmer had guarded against shell escapes (a known feature of vi), by making this script the login shell. However, he couldn't guard against another feature :e /etc/passwd You can attempt to make your script as safe as possible by 1) being very restrictive in your choice of UID. That is, make the script setuid for a non-privileged user, rather than root (for example, if it must write a log file, could the log file live in some locked area, accessed only by a new and otherwise non-privileged account?) 2) making the script setgid rather than setuid, with a very restricted GID (see #1) 3) ensuring that the script is short, very simple, and does not make use of commands such as `vi', `mail' or anything interactive. setuid programs should do ONE thing only, and in a non-complex manner. 4) setting the PATH, IFS, and other environment variables explicitly within the script 5) locking down the permissions on the script. If possible allow it to be run only by group members. Never allow write permission. 6) If your version of UNIX permits, take away read permission for anyone other than the owner. It's a bit harder to break something if you can't see how it works. 7) Rewrite it in C (carefully) 8) Convince your management that they don't really need this. If you plan to keep the script, or re-write it, try and get a copy of the paper. If you can't find it, send me mail. Vicki Brown A/UX Development Group Apple Computer, Inc. Internet: vlb@apple.com MS 58A, 10440 Bubb Rd. UUCP: {sun,amdahl,decwrl}!apple!vlb Cupertino, CA 95014 USA Ooit'n Normaal Mens Ontmoet? En..., Beviel't? (Did you ever meet a normal person? Did you enjoy it?) ----------------------------- From: Rob Bunten <rbunten@miclon.uucp> Subject: SUMMARY: finding disk usage of partitions Date: 10 Aug 90 17:07:16 GMT To: info-unix@sem.brl.mil Thanks for the responses to my original request for the disk usage of directories, not including stuff mounted from other partitions. The responses were from: xie@math.arizona.edu suggested using df(1) :-) dietrich@cernvax.cern.ch sent a program which is used to determine the number of files and directories and the occupied disk space in a file hierarchy beginning at startdirectory. I have the source, but haven't managed to get it to run on SunOS. meissner@osf.org mentions that the gnu fileutils 1.3 package contains a du rewrite that adds a -f option to prevent du from crossing filesystem boundaries. tmdg@ti.co.uk has a program that reports file fragmentation that could possibly be adapted. eirik@elf.tn.cornell.edu suggested the following (this is what I used): Apparently you want a way to tell du not to cross mount points; if not, I am probably answering a different question than the one you asked. It also sounds like you are ignoring all but local partitions. Assuming you have root permissions on the machine with the disks, there is a way of doing what you want. It is, in a sense, cheating, but I'd rather cheat than lose. :-) Here's the idea: export all file systems you're interested in to localhost, and mount them via NFS. As an example, the following shows the usage in my root partition: exportfs -i -o root=localhost,access=localhost / mount -n localhost:/ /mnt du /mnt mount -f localhost:/ /mnt umount /mnt chip@chinacat.unicom.com has written a du reimplementation. It is more oriented towards the SysV world, but it might be usable. paul@ixi-limited.co.uk suggests: find / -fstype nfs -prune -o -type f -exec du -s {} \; | \ awk ' { total = total + $1 } END { print total }' However, this doesn't do quite what I wanted, as I wanted the totals for each directory. Sorry for the delay in summarizing (the original posting was on 4th July). ----------------------------- From: QQ11@liverpool.ac.uk Subject: HP-UX 7.0 problems with ps(1) and awk(1) in pipe Date: 10 Aug 90 17:32:04 GMT To: info-unix@sem.brl.mil I have a simple csh script which ran without any problems at HP-UX 3.1 on our 9000/850. However at 7.0 the behaviour is different. The different behaviour has proved consistent enough for me to seek help from you. The script fetches a file from another system every 24 hours and the script is started by cron(1M). The process waits until the file arrives. If for some reason the transfer has not taken place 24 hours later, I want the earlier process killed. The following line of code is used to find the old PID. set exists=`ps -uqq11 | awk '$4 == "getus.csh" && $1 != x { print $1 }' x=$$ -` This looks for the PIDs of the program and finds the older one if it exists (if it is found kill(1) is used). This worked fine at HP-UX 3.1 but at 7.0 a "spurious" PID is found (presumably as a result of executing part of the above pipe). The resulting kill(1) fails since the process is already dead. Here is output of ps -uqq11 in same script before the pipe: 11752 ? 0:00 sh 11942 ? 0:00 ps 11764 ? 0:00 getus.csh I would be grateful if any HP-UX 7.0 guru can explain precisely what is happening i.e. why does the other process get included at 7.0 and not at 3.1 (for 9000/300 fans, HP-UX 3.1 on the 800 was similar to 6.5 on the 300s). While I'm aware that I can do the whole thing differently (send *good* suggestions to me if you want :-)), I'd like to get to the root of the problem. Thanks. Alan Thew University of Liverpool Computer Laboratory Bitnet/Earn: QQ11@LIVERPOOL.AC.UK or QQ11%UK.AC.LIVERPOOL @ UKACRL UUCP : ....!mcsun!ukc!liv!qq11 Voice: +44 51 794 3735 Internet : QQ11@LIVERPOOL.AC.UK or QQ11%LIVERPOOL.AC.UK @ NSFNET-RELAY.AC.UK ----------------------------- From: Bob Palowoda <palowoda@fiver.uucp> Subject: rexecd for ESIX? Date: 10 Aug 90 17:54:03 GMT To: info-unix@sem.brl.mil Has anyone have a working example of rexecd for ESIX? Specificly I am looking for one based off of 4.3 tahoe. ---Bob -- Bob Palowoda palowoda@fiver | *Home of Fiver BBS* Home {sun}!ys2!fiver!palowoda | 415-623-8809 1200/2400 {pacbell}!indetech!fiver!palowoda | An XBBS System Work {sun,pyramid,decwrl}!megatest!palowoda| 415-623-8806 1200/2400/19.2k TB+ ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: help sought - securing a terminal/line Date: 10 Aug 90 18:29:46 GMT To: info-unix@sem.brl.mil >You're saying V.4 doesn't use inittab? I'm saying it doesn't necessarily run "getty" out of "inittab". >Um, this is not good. The flexibility of inittab has been very helpful. I >don't want to go back to kludging a login or getty front-end again. Um, this is not good. You're making some inferences that aren't justified based purely on what I said, and that aren't, in fact, correct.... "ttymon" will listen on a whole bunch of ports, and spin off a process when the port comes up. The process can run whatever program you want it to. You can also run "getty" out of "inittab", if you want to, or any other program. >What else does V.3.2 have that V.4 hasn't? A shared library mechanism that requires you to explicitly ask for the shared version of a library, for one thing.... (S5R4's, like the SunOS 4.x one from which it's derived, gives you the shared library by default if there is one.) Go buy the S5R4 documentation - or some subset thereof, the entire documentation set is rather expensive and only crazy completists like me buy it out of our own pockets. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: help sought - securing a terminal/line Date: 10 Aug 90 18:32:49 GMT To: info-unix@sem.brl.mil >Fear not; the V.4 init still understands inittab. All Guy was >referring to was the advent of ttymon, a STREAMS-based tty port >monitor that provides a more convenient way to deal with terminals >than the old inittab method. And also gives you a few additional bells and whistles, such as autobauding (not the bit where you hit BREAK to get it to cycle through speeds, although "ttymon" does support that, but the bit where you type a character and, based on what the character looked like, "ttymon" guesses the speed of the line; same sort of thing as the 4.[23]BSD "getty" supports). It does permit you to run some program other than "login" on some port when it comes up. ----------------------------- From: "BURNS,JIM" <gt0178a@prism.gatech.edu> Subject: Re: help sought - securing a terminal/line Date: 11 Aug 90 01:20:33 GMT To: info-unix@sem.brl.mil in article <2103.26bf3e39@miavx1.acs.muohio.edu>, pemurray@miavx1.acs.muohio.edu (Peter Murray) says: > In article <1990Aug7.111611.434@warwick.ac.uk>, cudcv@warwick.ac.uk (Rob McMahon) writes: >> Assuming we're talking BSD here (that certainly looks like a 4.3 /etc/ttys >> file to me ...), can't you just use the `lo' gettytab entry for this: >> lo str /usr/bin/login program to exec when name obtained > Yes, I'm dealing with BSD (Ultrix, to be exact). Umm, the original poster (Tony Rhodes?) specifically asked for an HP-UX solution. In that case, altho' /etc/ttys exists, /etc/inittab would be the most appropriate solution since it avoids getty clones, and allows you to automatically respawn the app. [Oracle, etc.] if it aborts. One possible disadvantage is stty settings may not be correct if getty/login don't run first. (I've been bit by this on HP-UX.) However, since the original poster mentioned the need for several different Oracle apps., this could be handled by embedding the appropriate command tail option in a script that also runs stty (, and probably should also do something like 'trap "exit" 2 3' to prevent breaking out before Oracle starts - the inittab respawn will then restart it). At a minimum on HP-UX, you will need to do an 'stty icrnl ocrnl ixon'. One more point - as of HP-UX 7.0 (6.5?) if you need to do a set[gu]id on the script, the first line MUST be '#!/bin/ksh' (or what ever shell you want). -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: C-shell programming Keywords: csh, multiple file input Date: 10 Aug 90 18:45:22 GMT To: info-unix@sem.brl.mil >Appropriate use of /dev/fd could make it even neater, if you don't already >have sorted files. And if you *do* have "/dev/fd", which most UNIX systems at this point don't have, although I think S5R4 might have it. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: How to tell if a process exists Date: 10 Aug 90 18:53:25 GMT To: info-unix@sem.brl.mil > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. He was referring to the "kill()" library routine, not the "kill" command.... ----------------------------- From: Vicki Brown <vlb@magic.apple.com> Subject: Re: How to tell if a process exists Date: 10 Aug 90 19:44:33 GMT Sender: usenet@apple.com Sender: To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Wrong. RTFM -- kill(pid, 0) > > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. > > What kind of UNIX _are_ you running?? ---> C <--- ( man 2 kill 8^) Vicki Brown A/UX Development Group Apple Computer, Inc. Internet: vlb@apple.com MS 58A, 10440 Bubb Rd. UUCP: {sun,amdahl,decwrl}!apple!vlb Cupertino, CA 95014 USA Ooit'n Normaal Mens Ontmoet? En..., Beviel't? (Did you ever meet a normal person? Did you enjoy it?) ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: How to tell if a process exists Date: 10 Aug 90 21:47:42 GMT To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: -In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: ->Wrong. RTFM -- kill(pid, 0) - Hmmm -- must be running Reverse Polish Unix down under, 'cause my -manual sez: " kill [-sig] processid... ", and I've been doing it that way -for a looooooooong time. Doing what, incorrectly reading your manual? ----------------------------- From: Terry Laskodi <terryl@osf.osf.org> Subject: Re: How to tell if a process exists Date: 10 Aug 90 22:16:13 GMT Sender: news@osf.org To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Wrong. RTFM -- kill(pid, 0) > > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. > > What kind of UNIX _are_ you running?? Well, you're both right. Boyd was describing kill(2); Sam was describing kill(1)..... ----------------------------- From: Mike Verstegen <mdv@domain.com> Subject: make's usage of VPATH Keywords: make VPATH Date: 10 Aug 90 20:30:19 GMT Sender: mdv@comtst.uucp To: info-unix@sem.brl.mil A recent posting's comment about VPATH in make prompted me to use strings(1) to check our make to see if our makes were configured with this feature. Both of our systems' (3B2 V.3.1 and ISC 2.0.2) makes had the text VPATH in them. Then, using the documentation for nmake, I tried to get VPATHs to work. Unfortuanately, it did not. Either I don't understand VPATH as used in make, or make doesn't understand what I'm asking for. What I think VPATHs do is to provide alternate locations from source files in make's dependency analysis. For example, if I'm working on a project and I want to try out a private modification I could do the following: Directory contents: /u/official.d work.d ============= ====== foo.c foo.c bar.c Makefile contents: OBJ=foo.o bar.o fubar: $(OBJ) cc -o fubar $(OBJ) Commands executed: cd work.d VPATH=.:/u/official.d # also tried putting this in Makfile, no change export VPATH make foobar Results: Make: Don't know how to make bar.o. Stop. I think (acutally I thought): make would look in work.d and see foo.c in . (the first component in VPATH) and compile to foo.o as usual [it did]. Then, it would look for bar.c in . and see that it was not there. make would then look in /u/offical.d (the next component in VPATH), see it there, and use that as the file for complication [it did not]. Since VPATH is not a doucmented feature (at least that I can find) I know I cannot expect it to work, though I really would like this capability. I would appreciate any feedback on whether what I have described above is a correct expection and, if so, why doesn't it work? If it's not supposed to work (i.e. VPATH was there just to fool people like me), maybe I'll try to track down nmake which claims to support this feature. Please e-mail replies and I'll summarize if there is enough interest. -- Mike Verstegen ..!uunet!comtst!mdv mdv@domain.com ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Printer Accounting File Parsing Date: 10 Aug 90 22:37:46 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <24110@adm.BRL.MIL>, BKEHOE%widener writes: | | Here's something that should be simple to solve..it can be in anything (C/ | awk/shell/whatever). | I need to parse down the results of the printer accounting file into a total | for each user for that 2-week or month-long period of time, and send mail to | those users that've gone above 50 pages saying something like "Calm down". | I've been futzing in awk but can't seem to pull it off -- and in C my string | manipulation seems to be off (admittedly I haven't spent a *lot* of time | hacking it out). | Oh, I'm running SunOS 4.0.3 if yer interested. Here's what the file typically | looks like: | | --cut-- | 2.00 laverne:brendan | 3.00 shirley:quairoli | 17.00 laverne:doan | 1.00 sabrina:neveln | 5.00 laverne:jennifer | 9.00 ashley:ware | --cut-- | It'd be nice if I could assess the # of pages they print off of each client | too, but that may be overkill. | Thanks for your help.. Good that you said "whatever", so I won't get flamed for using Perl... ================================================== #!/usr/bin/perl while (<>) { ($pages,$host,$user) = /^\s+(\S+)\s+(\S+):(\S+)$/; $usertotal{$user} += $pages; $hosttotal{$host} += $pages; } print "Total by user:\n"; for (sort keys usertotal) { printf "%20s %5d\n", $_, $usertotal{$_}; } print "Total by host:\n"; for (sort keys hosttotal) { printf "%20s %5d\n", $_, $hosttotal{$_}; } ================================================== Season to taste. Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> Subject: Re: Printer Accounting File Parsing Date: 11 Aug 90 00:02:38 GMT To: info-unix@sem.brl.mil In article <24110@adm.BRL.MIL> BKEHOE%widener@pucc.princeton.edu writes: : : Here's something that should be simple to solve..it can be in anything (C/ : awk/shell/whatever). : I need to parse down the results of the printer accounting file into a total : for each user for that 2-week or month-long period of time, and send mail to : those users that've gone above 50 pages saying something like "Calm down". : I've been futzing in awk but can't seem to pull it off -- and in C my string : manipulation seems to be off (admittedly I haven't spent a *lot* of time : hacking it out). : ... : It'd be nice if I could assess the # of pages they print off of each client : too, but that may be overkill. No problem. ---------- CUT HERE ---------- #!/usr/bin/perl $THRESHOLD = 50; while (<>) { ($pages, $wherewho) = split(' '); ($where, $who) = split(/:/, $wherewho); $sum{$who} += $pages; $client{$who} .= "$where " unless $clientsum{$wherewho}; $clientsum{$wherewho} += $pages; } foreach $who (keys %sum) { next if $sum{$who} < $THRESHOLD; @clients = sort split(' ', $client{$who}); $breakdown = ''; if (@clients >= 2) { $breakdown = "Breakdown:\n\tMachine \tPages\n"; foreach $client (@clients) { $breakdown .= sprintf("\t%-16s%5d\n", $client, $clientsum{"$client:$who"}); } } open(MAIL,"|/bin/mail $who") || die "Can't run mail: $!\n"; print MAIL <<EOF; Subject: printer usage Dear $who: You printed $sum{$who} pages in the last accounting period. Calm down. $breakdown Sincerely, The Printer Accounting Daemon EOF close MAIL; } Larry Wall lwall@jpl-devvax.jpl.nasa.gov ----------------------------- From: Bob Willey <bob@consult.uucp> Subject: Re: backing up an entire unix/xenix system Keywords: Backup Date: 10 Aug 90 22:19:11 GMT Followup-To: comp.unix.xenix To: info-unix@sem.brl.mil In article <4@icdi50.UUCP> steve@icdi50.UUCP (Steve M. Ciarciello) writes: >Does anybody know of a utility that will back up an entire disk drive to >streaming tape under SCO Xenix or Unix. >The utility that I would like to have would allow the end user to backup >every block of the disk thereby allowing a complete disk restore from the >tape. This would therefore include the operating system and all filesystems. >I ask this question because I come from a world of mini computers that would >backup everything. A restore of the entire system from this type backup was >Steve Ciarciello >CompuData, Inc. >Philadelphia, PA This is a common problem. Using tar and the like will only give you mixed results. You must be very careful. We have been using CTAR from MicroLite with EXCELLENT results. It does a complete backup of ALL files including character, fifo, etc. It also comes with a utility to create a rootable/bootable floppy. This creates all the necessary utilities, and YOUR kernel and device drivers so that if you have a crash. 1. Replace disk 2. Boot up from rootable/bootable CTAR disk 3. Pick NEW Disk (format and all done) 4. Restore option (use most recent tape) 5. Reboot system and you are up and running. Much easier that the horse X#$% you have to do using tar, and reinstalling Unix/Xenix. You can reach MicroLite on uunet!mlite!info uunet!mlite!tom We have this installed at ALL customer sites and would not leave home without it. We consider it a mandatory option. Hope this helps. -- >.. CCS Enterprises, Inc. .. Bob Willey, CDP ..< >.. P.O. Drawer 1690 .. uunet!consult!bob ..< >.. Easton, Maryland 21601 .. (301) 820-4670 ..< >.......................BBS: (301) 476-5098.....................< ----------------------------- From: Ken Boi <boi@richsun.cpg.trs.reuter.com> Subject: AWK Language Question Date: 10 Aug 90 22:25:24 GMT Sender: news@richsun.cpg.trs.reuter.com To: info-unix@sem.brl.mil According to the book "The AWK Programming Language", there are built-in string functions. One of them is 'gsub'. I have tried using it with the following comand line statement which is very close to the example in the book: awk '{ gsub(/USA/, "United States"); print }' awkdata where 'awkdata' is any text file. I get the error messages: awk: syntax error near line 1 awk: illegal statement near line 1 Anybody know why? ----------------------------- From: NRAO Array Operations Center <nraoaoc@jupiter.nmt.edu> Subject: permissions and parameters on terminal line Date: 10 Aug 90 23:01:05 GMT Sender: Ruth Milner <rmilner@zia.aoc.nrao.edu> To: info-unix@sem.brl.mil I have a user with a device attached to a serial line which he is writing a program to talk to. The problem is this: I don't particularly want to install his program setuid root, so how do I get the system to set the ownership of the terminal device at boot time so that it will stay that way as long as the system is up? Currently, every time he runs the program he has to first run something I gave him the change the ownership, and then after his program finishes the device reverts to root. Running a daemon on the line is not a nice solution, either, since if it dies for some reason the same problem crops up. Ideally I would like to be able to say something in /etc/rc.local like: chown -permanent him /dev/tty1c stty -permanent 4800 raw /dev/tty1c Obviously these commands won't work, but is there something else in stock UNIX which will? init won't work because every time it wakes up it interferes with his program; I have had to turn it off on that line. The system is a Solbourne 5/801 (SPARC CPU chip) running OS/MP 4.0c (= SunOS 4.0.3). Thanks in advance. Please reply by email and I will post the final solution. -- Ruth Milner Systems Manager NRAO/VLA Socorro NM rmilner@zia.aoc.nrao.edu ----------------------------- From: william n bell <wnbell@acsu.buffalo.edu> Subject: Emacs Date: 11 Aug 90 00:50:06 GMT Sender: news@acsu.buffalo.edu Nntp-Posting-Host: lictor.acsu.buffalo.edu To: info-unix@sem.brl.mil Who can I contact to get a Unix version of emacs? Is it public domain?? WHere can I find it?? Send email. Thanks. -- Out Of Touch BBS - 716-825-4268 from 8pm-8am! FIDO 1:260/170... Online games! ----------------------------- From: "here kitty, kitty..." <daveb@llama.ingres.com> Subject: Demented question -- anyone retargeted yacc for nawk? Date: 11 Aug 90 01:12:15 GMT To: info-unix@sem.brl.mil After doing a bunch of programming in nawk recently, I found myself wondering if anyone has retargeted a yacc-like parser generator for awk. I don't know how useful this would be, but it has potential amusement value [much like Roger Rohrbach's lisp written in old-awk]. It might also be handy for prototyping "little languages" you don't want to do via recursive descent. from right field, -dB "Bottom of the 4th, Cooper pitching" - tibetan baseball David Brower: daveb@rtech^H^H^H^H^Hingres.comd ----------------------------- From: James Brister <brister@decwrl.dec.com> Subject: Timeout on shell command. Date: 11 Aug 90 02:24:33 GMT Sender: News <news@wrl.dec.com> X-Checksum-Snefru: 8b1c0fca 68a8627c 3a923ed5 0f83a013 To: info-unix@sem.brl.mil I'd like to have a shell script run a command, but if that command doesn't finish in X seconds, then the script should kill it, if the command finishes sooner then the script should immediately continue. Any ideas on how one could achieve this? Thanks James -- James Brister brister@decwrl.dec.com DEC Western Software Lab. .....!decwrl!brister "Politics is comedy with pretense" -- Mark Alan Stamaty ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@ecf.ncsl.nist.gov (SMTP MAILER) (08/12/90)
----Reason for mail failure follows---- Sending mail to host ecf.ncsl.nist.gov : Fatal reply code to command 'RCPT TO:<ise.ncsl.nist.gov@ecf.ncsl.nist.gov>': 550 User "ise.ncsl.nist.gov" Unknown. ----Transcript of message follows---- Date: 12 Aug 90 06:38:00 EST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#114 To: "ise.ncsl.nist.gov" <ise.ncsl.nist.gov@ecf.ncsl.nist.gov> Return-Path: <unixinfo-request@ecf.ncsl.nist.gov> Received: from SEM.BRL.MIL by ecf.ncsl.nist.gov with SMTP ; Sun, 12 Aug 90 06:37:55 EST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab06918; 12 Aug 90 5:58 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa06885; 12 Aug 90 5:45 EDT Date: Sun, 12 Aug 90 05:45:39 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#114 Message-ID: <9008120545.aa06885@SEM.BRL.MIL> INFO-UNIX Digest Sun, 12 Aug 1990 V10#114 Today's Topics: Re: Foo Bar article "Get Ready for GNU Software" in Computer World magazine SUMMARY: finding disk usage of partitions Re: help sought - securing a terminal/line Re: C-shell programming Re: Suid script security Re: How to tell if a process exists make's usage of VPATH Re: book request, want advice AWK Language Question permissions and parameters on terminal line Re: Printer Accounting File Parsing Re: Millisecond clock Emacs Re: sorting (using sort/sed/awk/whatever) Re: What's wrong with this Bourne shell script? Curses for terminals w/space-taking attributes path in news articles System VR4/i386 - when ? Re: Checkpoints for large jobs Re: KSH recommendations? SCO Vpix works under UHC SVR4? the f2c program Re: the f2c program Re: Working with sed fuser for sco unix v3.2.1 "make" file question Re: Timeout on shell command. make SUFFIXES question..... link (ln) with *one* name? ----------------------------------------------------------------- From: "Karen C. Pichnarczyk" <karyn@nssdca.gsfc.nasa.gov> Subject: Re: Foo Bar Date: 8 Aug 90 18:31:37 GMT Sender: news@dftsrv.gsfc.nasa.gov To: info-unix@sem.brl.mil Foo Bar is derived from the abbreviation FUBAR: F: American English colloquialism for 'messed', or 'destroyed' ('nice' people don't use this language) U: Up B: Beyond A: All R: Recognition Karyn ***disclaimer: insert standard disclaimer here ----------------------------- From: Dan_Jacobson@att.com Subject: article "Get Ready for GNU Software" in Computer World magazine Date: 10 Aug 90 16:21:42 GMT Sender: Dan Jacobson <danj1@cbnewse.att.com> Followup-To: gnu.misc.discuss To: info-unix@sem.brl.mil There's a 1/2 page article "Get Ready for GNU Software," in Computer World magazine, Aug. 6, 1990, page 102, by Simson L. Garfinkel. Quotes: "...Stallman, who by many accounts may be the world's best programmer." "...GNU Emacs, is becoming the standard Unix programmer's editor." "...Stallman was awarded a $240,000 ``Genius Grant'' from the MacArthur Foundation." -- Dan_Jacobson@ATT.COM +1-708-979-6364 ----------------------------- From: Rob Bunten <rbunten@miclon.uucp> Subject: SUMMARY: finding disk usage of partitions Date: 10 Aug 90 17:07:16 GMT To: info-unix@sem.brl.mil Thanks for the responses to my original request for the disk usage of directories, not including stuff mounted from other partitions. The responses were from: xie@math.arizona.edu suggested using df(1) :-) dietrich@cernvax.cern.ch sent a program which is used to determine the number of files and directories and the occupied disk space in a file hierarchy beginning at startdirectory. I have the source, but haven't managed to get it to run on SunOS. meissner@osf.org mentions that the gnu fileutils 1.3 package contains a du rewrite that adds a -f option to prevent du from crossing filesystem boundaries. tmdg@ti.co.uk has a program that reports file fragmentation that could possibly be adapted. eirik@elf.tn.cornell.edu suggested the following (this is what I used): Apparently you want a way to tell du not to cross mount points; if not, I am probably answering a different question than the one you asked. It also sounds like you are ignoring all but local partitions. Assuming you have root permissions on the machine with the disks, there is a way of doing what you want. It is, in a sense, cheating, but I'd rather cheat than lose. :-) Here's the idea: export all file systems you're interested in to localhost, and mount them via NFS. As an example, the following shows the usage in my root partition: exportfs -i -o root=localhost,access=localhost / mount -n localhost:/ /mnt du /mnt mount -f localhost:/ /mnt umount /mnt chip@chinacat.unicom.com has written a du reimplementation. It is more oriented towards the SysV world, but it might be usable. paul@ixi-limited.co.uk suggests: find / -fstype nfs -prune -o -type f -exec du -s {} \; | \ awk ' { total = total + $1 } END { print total }' However, this doesn't do quite what I wanted, as I wanted the totals for each directory. Sorry for the delay in summarizing (the original posting was on 4th July). ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: help sought - securing a terminal/line Date: 10 Aug 90 18:29:46 GMT To: info-unix@sem.brl.mil >You're saying V.4 doesn't use inittab? I'm saying it doesn't necessarily run "getty" out of "inittab". >Um, this is not good. The flexibility of inittab has been very helpful. I >don't want to go back to kludging a login or getty front-end again. Um, this is not good. You're making some inferences that aren't justified based purely on what I said, and that aren't, in fact, correct.... "ttymon" will listen on a whole bunch of ports, and spin off a process when the port comes up. The process can run whatever program you want it to. You can also run "getty" out of "inittab", if you want to, or any other program. >What else does V.3.2 have that V.4 hasn't? A shared library mechanism that requires you to explicitly ask for the shared version of a library, for one thing.... (S5R4's, like the SunOS 4.x one from which it's derived, gives you the shared library by default if there is one.) Go buy the S5R4 documentation - or some subset thereof, the entire documentation set is rather expensive and only crazy completists like me buy it out of our own pockets. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: help sought - securing a terminal/line Date: 10 Aug 90 18:32:49 GMT To: info-unix@sem.brl.mil >Fear not; the V.4 init still understands inittab. All Guy was >referring to was the advent of ttymon, a STREAMS-based tty port >monitor that provides a more convenient way to deal with terminals >than the old inittab method. And also gives you a few additional bells and whistles, such as autobauding (not the bit where you hit BREAK to get it to cycle through speeds, although "ttymon" does support that, but the bit where you type a character and, based on what the character looked like, "ttymon" guesses the speed of the line; same sort of thing as the 4.[23]BSD "getty" supports). It does permit you to run some program other than "login" on some port when it comes up. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: C-shell programming Keywords: csh, multiple file input Date: 10 Aug 90 18:45:22 GMT To: info-unix@sem.brl.mil >Appropriate use of /dev/fd could make it even neater, if you don't already >have sorted files. And if you *do* have "/dev/fd", which most UNIX systems at this point don't have, although I think S5R4 might have it. ----------------------------- From: Vicki Brown <vlb@magic.apple.com> Subject: Re: Suid script security Date: 10 Aug 90 19:41:32 GMT Sender: usenet@apple.com Sender: To: info-unix@sem.brl.mil In article <14920003@hpdmd48.boi.hp.com> markw@hpdmd48.boi.hp.com (Mark Wolfe) writes: > > I know that suid scripts are a bad idea from reading comp.questions and >comp.wizards over the last year or so. It seems that just about every guru >in the world has posted a warning NOT to do it, so I decided I would follow >the advice (it's a rare subject that all guru's agree on). However, it appears >that I'm now about to have one of these ugly animals forced on me from above, >so I'd like some advice: > > 1) Just what are the security risks involved? (i.e. how would someone attack > a system via one of these). > > 2) What can I do to make this as secure as possible? Warning - very long response ahead. Proceed at your own risk. <FF> There was a very interesting paper in the USENIX Association's publication, ;login: ( "How To Write a Setuid Program", Matt Bishop, ;login: Vol 12, Number 1, January/February 1987). An excerpt: Some versions of UNIX allow command scripts, such as shell scripts, to be made setuid ... Unfortunately, given the power and complexity of many command interpreters, it is often possible to force them to perform actions which were not intended, and which allow the user to violate system security. This leaves the owner of the setuid script open to a devastating attack. In general, such scripts should be avoided. ... suppose a site has a setuid script of sh commands. An attacker simply executes the script in such a way that the shell ... appears to have been invoked by a person logging in. UNIX applies the setuid bit on the script to the shell, and ... it becomes interactive... One way to avoid having a setuid script is to turn off the setuid bit on the script, and ... use a setuid [binary] program to invoke it. This program should take care to call the command interpreter by its full path name, and reset environment information such as file descriptors and environment variables to a known state. However, this method should be used only as a last resort and as a temporary measure, since with many command interpreters it is possible even under these conditions to force them to take undesirable action. The biggest problem with shell scripts is that you (the programmer / administrator) have very little control over the programs which run within the script. As a very real example, I ran across a script which allowed users to enter bug reports, using the "vi" editor. The script was setuid root, because it wanted to save files in funny places. The programmer had guarded against shell escapes (a known feature of vi), by making this script the login shell. However, he couldn't guard against another feature :e /etc/passwd You can attempt to make your script as safe as possible by 1) being very restrictive in your choice of UID. That is, make the script setuid for a non-privileged user, rather than root (for example, if it must write a log file, could the log file live in some locked area, accessed only by a new and otherwise non-privileged account?) 2) making the script setgid rather than setuid, with a very restricted GID (see #1) 3) ensuring that the script is short, very simple, and does not make use of commands such as `vi', `mail' or anything interactive. setuid programs should do ONE thing only, and in a non-complex manner. 4) setting the PATH, IFS, and other environment variables explicitly within the script 5) locking down the permissions on the script. If possible allow it to be run only by group members. Never allow write permission. 6) If your version of UNIX permits, take away read permission for anyone other than the owner. It's a bit harder to break something if you can't see how it works. 7) Rewrite it in C (carefully) 8) Convince your management that they don't really need this. If you plan to keep the script, or re-write it, try and get a copy of the paper. If you can't find it, send me mail. Vicki Brown A/UX Development Group Apple Computer, Inc. Internet: vlb@apple.com MS 58A, 10440 Bubb Rd. UUCP: {sun,amdahl,decwrl}!apple!vlb Cupertino, CA 95014 USA Ooit'n Normaal Mens Ontmoet? En..., Beviel't? (Did you ever meet a normal person? Did you enjoy it?) ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Suid script security Date: 11 Aug 90 21:01:33 GMT To: info-unix@sem.brl.mil >Now, what if the name of the very shell script were e.g. "-i"? Wouldn't that >give a nice exec? > > execl("/bin/sh", "sh", "-i", (char *) 0); > >So link the script to a file named "-i", and voila! >Yes, one needs write permission somewhere on the same device, if one's >operating system doesn't support symbolic links. > >What about the csh command interpreter? Well, 4.2BSD provides us with a csh >which has a NEW option: "-b"! Its goal is to avoid just the thing described >above: Whereas the Bourne shell already has an option whose effect is to avoid the thing just described above - "-". Yup, just a dash by itself, as in #! /bin/sh - >the mnemonic for `b' is `break'; To quote the C shell source code: case 'b': /* -b Next arg is input file */ batch++; so I don't think the mnemonic was intended to be "break".... ----------------------------- From: Vicki Brown <vlb@magic.apple.com> Subject: Re: How to tell if a process exists Date: 10 Aug 90 19:44:33 GMT Sender: usenet@apple.com Sender: To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Wrong. RTFM -- kill(pid, 0) > > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. > > What kind of UNIX _are_ you running?? ---> C <--- ( man 2 kill 8^) Vicki Brown A/UX Development Group Apple Computer, Inc. Internet: vlb@apple.com MS 58A, 10440 Bubb Rd. UUCP: {sun,amdahl,decwrl}!apple!vlb Cupertino, CA 95014 USA Ooit'n Normaal Mens Ontmoet? En..., Beviel't? (Did you ever meet a normal person? Did you enjoy it?) ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: How to tell if a process exists Date: 10 Aug 90 21:47:42 GMT To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: -In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: ->Wrong. RTFM -- kill(pid, 0) - Hmmm -- must be running Reverse Polish Unix down under, 'cause my -manual sez: " kill [-sig] processid... ", and I've been doing it that way -for a looooooooong time. Doing what, incorrectly reading your manual? ----------------------------- From: Terry Laskodi <terryl@osf.osf.org> Subject: Re: How to tell if a process exists Date: 10 Aug 90 22:16:13 GMT Sender: news@osf.org To: info-unix@sem.brl.mil In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Wrong. RTFM -- kill(pid, 0) > > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. > > What kind of UNIX _are_ you running?? Well, you're both right. Boyd was describing kill(2); Sam was describing kill(1)..... ----------------------------- From: Sam Bassett RCS <samlb@pioneer.arc.nasa.gov> Subject: Re: How to tell if a process exists Date: 11 Aug 90 06:20:20 GMT Sender: news@amelia.nas.nasa.gov To: info-unix@sem.brl.mil Ooops -- yer right -- my mistake. Sorrreee..... Sam'l Bassett, Sterling Software @ NASA Ames Research Center, Moffett Field CA 94035 Work: (415) 604-4792; Home: (415) 969-2644 samlb@well.sf.ca.us samlb@ames.arc.nasa.gov <Disclaimer> := 'Sterling doesn't _have_ opinions -- much less NASA!' ----------------------------- From: Mike Verstegen <mdv@domain.com> Subject: make's usage of VPATH Keywords: make VPATH Date: 10 Aug 90 20:30:19 GMT Sender: mdv@comtst.uucp To: info-unix@sem.brl.mil A recent posting's comment about VPATH in make prompted me to use strings(1) to check our make to see if our makes were configured with this feature. Both of our systems' (3B2 V.3.1 and ISC 2.0.2) makes had the text VPATH in them. Then, using the documentation for nmake, I tried to get VPATHs to work. Unfortuanately, it did not. Either I don't understand VPATH as used in make, or make doesn't understand what I'm asking for. What I think VPATHs do is to provide alternate locations from source files in make's dependency analysis. For example, if I'm working on a project and I want to try out a private modification I could do the following: Directory contents: /u/official.d work.d ============= ====== foo.c foo.c bar.c Makefile contents: OBJ=foo.o bar.o fubar: $(OBJ) cc -o fubar $(OBJ) Commands executed: cd work.d VPATH=.:/u/official.d # also tried putting this in Makfile, no change export VPATH make foobar Results: Make: Don't know how to make bar.o. Stop. I think (acutally I thought): make would look in work.d and see foo.c in . (the first component in VPATH) and compile to foo.o as usual [it did]. Then, it would look for bar.c in . and see that it was not there. make would then look in /u/offical.d (the next component in VPATH), see it there, and use that as the file for complication [it did not]. Since VPATH is not a doucmented feature (at least that I can find) I know I cannot expect it to work, though I really would like this capability. I would appreciate any feedback on whether what I have described above is a correct expection and, if so, why doesn't it work? If it's not supposed to work (i.e. VPATH was there just to fool people like me), maybe I'll try to track down nmake which claims to support this feature. Please e-mail replies and I'll summarize if there is enough interest. -- Mike Verstegen ..!uunet!comtst!mdv mdv@domain.com ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: book request, want advice Keywords: unix books, non-trivial Date: 10 Aug 90 21:52:37 GMT To: info-unix@sem.brl.mil In article <1900@batman.moravian.EDU> dodgeT@batman.moravian.EDU (Asmodeus) writes: - I would like the net's advice on (a) good book(s) concerning -the non-trivial aspects of unix. I am already familiar w/many of the -commands...that is not a problem...what i want is a book that -details and explains many of the unix features that separate it from -the smaller operating systems. Ex.-> devices, virtual memory, perl, -other various shells...basically a good book that doesn't spend too much -time explaining every line-editor and vi to me...tell me something -interesting... Libes & Ressler, "Life With UNIX", would probably tell you much of what you want to know, but only at a survey level. For details you have to dig into lots of places. ----------------------------- From: Ken Boi <boi@richsun.cpg.trs.reuter.com> Subject: AWK Language Question Date: 10 Aug 90 22:25:24 GMT Sender: news@richsun.cpg.trs.reuter.com To: info-unix@sem.brl.mil According to the book "The AWK Programming Language", there are built-in string functions. One of them is 'gsub'. I have tried using it with the following comand line statement which is very close to the example in the book: awk '{ gsub(/USA/, "United States"); print }' awkdata where 'awkdata' is any text file. I get the error messages: awk: syntax error near line 1 awk: illegal statement near line 1 Anybody know why? ----------------------------- From: NRAO Array Operations Center <nraoaoc@jupiter.nmt.edu> Subject: permissions and parameters on terminal line Date: 10 Aug 90 23:01:05 GMT Sender: Ruth Milner <rmilner@zia.aoc.nrao.edu> To: info-unix@sem.brl.mil I have a user with a device attached to a serial line which he is writing a program to talk to. The problem is this: I don't particularly want to install his program setuid root, so how do I get the system to set the ownership of the terminal device at boot time so that it will stay that way as long as the system is up? Currently, every time he runs the program he has to first run something I gave him the change the ownership, and then after his program finishes the device reverts to root. Running a daemon on the line is not a nice solution, either, since if it dies for some reason the same problem crops up. Ideally I would like to be able to say something in /etc/rc.local like: chown -permanent him /dev/tty1c stty -permanent 4800 raw /dev/tty1c Obviously these commands won't work, but is there something else in stock UNIX which will? init won't work because every time it wakes up it interferes with his program; I have had to turn it off on that line. The system is a Solbourne 5/801 (SPARC CPU chip) running OS/MP 4.0c (= SunOS 4.0.3). Thanks in advance. Please reply by email and I will post the final solution. -- Ruth Milner Systems Manager NRAO/VLA Socorro NM rmilner@zia.aoc.nrao.edu ----------------------------- From: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> Subject: Re: Printer Accounting File Parsing Date: 11 Aug 90 00:02:38 GMT To: info-unix@sem.brl.mil In article <24110@adm.BRL.MIL> BKEHOE%widener@pucc.princeton.edu writes: : : Here's something that should be simple to solve..it can be in anything (C/ : awk/shell/whatever). : I need to parse down the results of the printer accounting file into a total : for each user for that 2-week or month-long period of time, and send mail to : those users that've gone above 50 pages saying something like "Calm down". : I've been futzing in awk but can't seem to pull it off -- and in C my string : manipulation seems to be off (admittedly I haven't spent a *lot* of time : hacking it out). : ... : It'd be nice if I could assess the # of pages they print off of each client : too, but that may be overkill. No problem. ---------- CUT HERE ---------- #!/usr/bin/perl $THRESHOLD = 50; while (<>) { ($pages, $wherewho) = split(' '); ($where, $who) = split(/:/, $wherewho); $sum{$who} += $pages; $client{$who} .= "$where " unless $clientsum{$wherewho}; $clientsum{$wherewho} += $pages; } foreach $who (keys %sum) { next if $sum{$who} < $THRESHOLD; @clients = sort split(' ', $client{$who}); $breakdown = ''; if (@clients >= 2) { $breakdown = "Breakdown:\n\tMachine \tPages\n"; foreach $client (@clients) { $breakdown .= sprintf("\t%-16s%5d\n", $client, $clientsum{"$client:$who"}); } } open(MAIL,"|/bin/mail $who") || die "Can't run mail: $!\n"; print MAIL <<EOF; Subject: printer usage Dear $who: You printed $sum{$who} pages in the last accounting period. Calm down. $breakdown Sincerely, The Printer Accounting Daemon EOF close MAIL; } Larry Wall lwall@jpl-devvax.jpl.nasa.gov ----------------------------- From: Tony Burzio <burzio@mmlai.uucp> Subject: Re: Millisecond clock Keywords: HP-UX SYSV Date: 11 Aug 90 00:34:16 GMT To: info-unix@sem.brl.mil The folowing program for millisecond sleep works under HP-UX SYSV, so it should work on an ATT (serious finger crossing :-). Compile with: cc -O timer.c -o timer --------------------------------- cut here ----------------------------------- #include <signal.h> #include <time.h> void myhandler() {} usleep(usec) int usec; { int sigret; struct itimerval rttimer; struct itimerval old_rttimer; struct sigaction *act, *oact ; rttimer.it_value.tv_sec = ( (float) usec) / 1000000; rttimer.it_value.tv_usec = ((float) usec) - ((float) rttimer.it_value.tv_sec * 1000000.0); rttimer.it_interval.tv_sec = 0; rttimer.it_interval.tv_usec = 0; (void) signal(SIGALRM,(myhandler)); setitimer (ITIMER_REAL, &rttimer, &old_rttimer); pause(); } main () { usleep(500000); } --------------------------- cut here -------------------------------------- ********************************************************************* Tony Burzio * OH! You have to turn it ON first! Martin Marietta Labs * mmlab!burzio@uunet.uu.net * - First day, DOS user. ********************************************************************* ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Millisecond clock Keywords: HP-UX SYSV Date: 11 Aug 90 20:55:54 GMT To: info-unix@sem.brl.mil >The folowing program for millisecond sleep works under HP-UX SYSV, so >it should work on an ATT (serious finger crossing :-). Crossing the fingers is a good idea here. "Xxx works under HP-UX SYSV, therefore it should work on an [arbitrary] ATT [System V release]" isn't a valid deduction. While some systems, including HP-UX, have "setitimer()", which your program uses, vanilla AT&T System V releases prior to S5R4 don't have it. ----------------------------- From: william n bell <wnbell@acsu.buffalo.edu> Subject: Emacs Date: 11 Aug 90 00:50:06 GMT Sender: news@acsu.buffalo.edu Nntp-Posting-Host: lictor.acsu.buffalo.edu To: info-unix@sem.brl.mil Who can I contact to get a Unix version of emacs? Is it public domain?? WHere can I find it?? Send email. Thanks. -- Out Of Touch BBS - 716-825-4268 from 8pm-8am! FIDO 1:260/170... Online games! ----------------------------- From: "Jon H. LaBadie" <jon@jonlab.uucp> Subject: Re: sorting (using sort/sed/awk/whatever) Date: 11 Aug 90 07:19:22 GMT To: info-unix@sem.brl.mil In article <13492@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > In article <MONTNARO.90Aug5102632@spyder.crd.ge.com> montanaro@crdgw1.ge.com (Skip Montanaro) writes: > >In article <13485@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > > Surely you jest. You're asking for an artificial intelligence program here. > >I don't know. The following short shell script seems to do what Luke wanted > >(cluster all the C++ groups together, regardless of their spot in the Usenet > >tree). > > It only orders by the last member of the hierarchy, which is not very helpful > (as you can see by running a large .newsrc through this process). For example, > foo.c++.bugs would be collected with other *.bugs, not with other c++ groups. While I see little value in the original poster's desires, Doug's comment on Skip's solution is easily taken care of with out AI type code. To wit: cut -d: -f1 .newsrc | awk -F. ' { for (i = NF; i >= 1; i--) printf("%s ", $i) print "" }' | paste -d: - .newsrc | sort | cut -d: -f2- > puke And should you not have cut (a Xenix related deficiency) let me know and I'll provide an awk/shell script to mimic it. Or perhaps there is a ???.sources version around. Jon -- Jon LaBadie {att, princeton, bcr}!jonlab!jon {att, attmail, bcr}!auxnj!jon ----------------------------- From: "Jon H. LaBadie" <jon@jonlab.uucp> Subject: Re: What's wrong with this Bourne shell script? Date: 11 Aug 90 07:36:45 GMT To: info-unix@sem.brl.mil In article <1990Aug6.172225.20319@iwarp.intel.com>, merlyn@iwarp.intel.com (Randal Schwartz) writes: > In article <1990Aug3.193231.3166@silma.com>, aab@silma (Andy Burgess) writes: > | While you're at it, is there a better way to get the total bytes > | of the files in a directory? > > PERL SCRIPT DELETED A script of mine called "addcol" was printed in UNIX World's monthly column Wizard's Grabbag and would do the same thing without perl; ls -ld | addcol -4 However, have we forgotten our roots? I'm surprised in this thread that no one has mentioned: TOTAL=`cat * | wc -c` Jon -- Jon LaBadie {att, princeton, bcr}!jonlab!jon {att, attmail, bcr}!auxnj!jon ----------------------------- From: Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> Subject: Re: What's wrong with this Bourne shell script? Date: 11 Aug 90 18:55:52 GMT To: info-unix@sem.brl.mil In article <850@jonlab.UUCP> jon@jonlab.UUCP (Jon H. LaBadie) writes: : In article <1990Aug6.172225.20319@iwarp.intel.com>, merlyn@iwarp.intel.com (Randal Schwartz) writes: : > In article <1990Aug3.193231.3166@silma.com>, aab@silma (Andy Burgess) writes: : > | While you're at it, is there a better way to get the total bytes : > | of the files in a directory? : > : > PERL SCRIPT DELETED : : A script of mine called "addcol" was printed in UNIX World's monthly : column Wizard's Grabbag and would do the same thing without perl; : : ls -ld | addcol -4 : : However, have we forgotten our roots? I'm surprised in this thread : that no one has mentioned: : : TOTAL=`cat * | wc -c` Let us be explicit about the advantages and disadvantages of these approaches. Any naive approach using ls is gonna screw up in /dev, and probably does the opposite of what you want on symbolic links. The cat approach has to read all the bytes (try it on a swapfile), but probably does what you want on symbolic links. It may or may not do what you want on files with holes in them. It doesn't do what you want with the last access times. It CERTAINLY doesn't do what you want in /dev, or in a directory containing a FIFO or a Unix domain socket. The stat structure in C is quite straightforward by comparison. Pity there's such a big ecological niche between shell and C... Larry ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: What's wrong with this Bourne shell script? Date: 12 Aug 90 05:25:07 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <850@jonlab.UUCP>, jon@jonlab (Jon H. LaBadie) writes: | However, have we forgotten our roots? I'm surprised in this thread | that no one has mentioned: | | TOTAL=`cat * | wc -c` Because it (a) skips files that start with dot, and (b) is *horribly* inefficient. Don't try this at home, kiddies! Just another UNIX hacker (and look, I didn't mention Perl here, either), -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "David T. Sandberg" <dts@quad.sialis.mn.org> Subject: Curses for terminals w/space-taking attributes Date: 11 Aug 90 08:48:39 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil I have been having problems with using curses to do screen handling on terminals with the "magic cookie glitch", i.e. space-taking attributes. (I have elected to crosspost to comp.lang.c after some consideration, since curses comes from the land of C.) The following simple fragment illustrates the problem. I've run this through on three systems (NCR Tower w/SysVr2, 386 w/SCO Xenix 2.3.2, and my faithful AT&T Unix PC w/OS version 3.51). /*-------------------*/ #include <curses.h> main() { initscr(); clear(); move( 5, 5 ); standout(); addstr( " This should be highlighted " ); standend(); refresh(); getch(); endwin(); } /*-------------------*/ On all three systems this code performs as expected when using a terminal without space-taking attributes (in other words, a _real_ terminal ;'). However, when using either a tvi905 or a wyse50, both of which require a space for the attribute data, this code performs properly only on the Tower (and more complex stuff of this sort doesn't even like to work there). On the other two systems the strings is displayed highlighted for the barest of moments, and then reverts back to normal before the keystroke is accepted via getch(). (Note that applications programs which use highlighting on these system/terminal combinations work perfectly... I'm reasonably certain that the termcap/terminfo files are not the culprit.) So, are two of these three curses implementations broken in this regard? Or is proper handling of XMC beyond the capability of most curses implementations? Or am I just lacking knowledge on how to handle these types of terminals via curses? (I hope it's the latter - I need to make this work as soon as possible, and I'm rather more comfortable with curses than I am with using the terminal databases directly. The 386 running SCO Xenix is the environment in which I need to actually overcome this, BTW.) Any and all comments regarding coding for terminals with those god-cursed space-taking attributes will be greatly appreciated. Please email responses to dts@quad.sialis.mn.org... but if you choose to followup for some reason, I have redirected same to comp.unix.questions, since I do not receive comp.terminals.) -- \\ \ David Sandberg, consultant \\ // "Small hats!" / Richfield MN // \\ \ dts@quad.sialis.mn.org \\ ----------------------------- From: V-Link System Administrator <root@vlink01.uucp> Subject: path in news articles Keywords: path news Date: 11 Aug 90 11:50:28 GMT To: info-unix@sem.brl.mil I don't seem to have something right in my news software, everytime I post news my "path" doesn't come up right. Could some one tell me where and how to set this up. It is the "path" that appears in the news header like the one you are reading in this article. Thanks in advance. -- V-Link Corporation | V-Link Sys Admin 1828 Darrow Drive |---------------------------------- Powell, OH 43065-9261 | Local : root (614)792-6363 | Remote: root@vlink01.UUCP ----------------------------- From: Per Andersson <perand@admin.kth.se> Subject: System VR4/i386 - when ? Date: 11 Aug 90 12:35:19 GMT To: info-unix@sem.brl.mil Has anybody seen a sold rel4 for the 386 ? Can anybody quote a price ? This has to be the best vapourware of 1990. In January agents promised 'it would be for sale in a couple of weeks'. The market is probably screwed because it's too many home systems and too many poor system managers which doesn't make good customers. So why worry their heads with all this new stuff ?. SCO has no plan when r4 will be considered, and Interactive just released 2.2. Why not concentrate on getting the enhancement working on r4 instead ? r4 working on ICLs machines doesn't help one bit because the big 386 market couldn't afford one, and should better buy a Sparcstation SLC, 'cos thats not more expensive than a top end 386, and runs DOS programs, just like the 386. WHEN WILL I BE ABLE TO BUY SYSTEM V rel 4 FOR THE i386 ? Per -- --- Per Andersson Royal Institute of Technology, Stockholm, Sweden perand@admin.kth.se, @nada.kth.se ----------------------------- From: Skip Montanaro <montnaro@spyder.crd.ge.com> Subject: Re: Checkpoints for large jobs Date: 11 Aug 90 13:11:23 GMT Sender: news@crdgw1.crd.ge.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil On a case-by-case basis, you may be able to modify your applications so they will recover. For instance, if your application is an iterative solver of some sort, you may be able to checkpoint the intermediate data periodically. When the program is restarted, a flag can be set so the program initializes from the intermediate solution data. There was a system a few years ago (maybe 1986?) developed at the University of Wisconsin that allowed jobs to be restarted (modulo some special I/O situations). It was reported in a USENIX conference of that era. Also, UNICOS on the CRAY has a checkpointing facility. You might investigate it, and ask Sequent why they haven't got something similar. -- Skip (montanaro@crdgw1.ge.com) ----------------------------- From: Bill Heiser - Unix Sys Admin <heiser@sud509.ed.ray.com> Subject: Re: KSH recommendations? Date: 11 Aug 90 15:44:00 GMT Sender: "Bill Heiser - Unix Sys Admin @ Raytheon Company, Sudbury MA" <heiser@sud509.ed.ray.com> To: info-unix@sem.brl.mil In article <1990Aug08.113542.13266@iti.uucp> todd@iti.UUCP (maroC ddoT) writes: > >Since ISC just added job control (to 2.2) you may want to keep in mind that >any korn shell compiled for an earlier ISC probally will not support any >job control. Does anyone know if ESIX has job control? -- Bill Heiser Work: heiser@tdw201.ed.ray.com {decuac,necntc,uunet}!rayssd!tdw201!heiser Home: Bill.Heiser@f240.n322.z1.fidonet.org (Fidonet 1:322/240) The Think_Tank BBS (508)655-3848 1200/2400/9600-HST Other: 75106.2332@compuserve.com Other: heiser@world.std.com (Public Access Unix) ----------------------------- From: teoh@uicbert.eecs.uic.edu Subject: SCO Vpix works under UHC SVR4? Date: 11 Aug 90 17:55:27 GMT To: info-unix@sem.brl.mil UHC indicated Vpix from Interactive would work w/ their release of SVR4 but has no knowledge about SCO's. And, SCO claims that their Vpix is functionally identical to the one from Interactive. My question is since every vendor installation procedure is different, is it possible, w/out any modification, to install and run SCO Vpix on UHC SVR4? -- Hai-Chuan Teoh * Email: teoh@uicbert.eecs.uic.edu Electrical Engr & Comp Sci * Tel: (312) 930-1942 Univ of Illinois * ----------------------------- From: Doug McDonald <mcdonald@aries.scs.uiuc.edu> Subject: the f2c program Date: 11 Aug 90 20:25:42 GMT Sender: News <usenet@ux1.cso.uiuc.edu> To: info-unix@sem.brl.mil On the computer research.att.com is a program called "f2c". It converts Fortran programs to, mostly, C. But it does NOT convert Fortran IO calls to C. Instead it just invokes some mysterious io routines. I take these to be somebody's Fortran IO runtime library - indeed, there are linking with certain libraries. But WHOSE libraries? Would someone with a Unix machine and NO Fortran compiler have these routines? IF so, exactly WHOSE Unix? I can't believe that the many different Fortran compilers out there would use the same runtime. So, whose will this thing work with???? Doug McDonald(mcdonald@aries.scs.uiuc.edu) ----------------------------- From: Henry Spencer <henry@zoo.toronto.edu> Subject: Re: the f2c program Date: 12 Aug 90 00:58:36 GMT To: info-unix@sem.brl.mil In article <1990Aug11.202542.9891@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: >On the computer research.att.com is a program called "f2c". It converts >Fortran programs to, mostly, C. But it does NOT convert Fortran IO >calls to C. Instead it just invokes some mysterious io routines. I >take these to be somebody's Fortran IO runtime library... whose will this >thing work with???? Also on research.att.com, in the same directory, are files named "libF77.Z" and "libi77.Z", which might be worth investigating. -- It is not possible to both understand | Henry Spencer at U of Toronto Zoology and appreciate Intel CPUs. -D.Wolfskill| henry@zoo.toronto.edu utzoo!henry ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Working with sed Date: 11 Aug 90 21:04:08 GMT To: info-unix@sem.brl.mil >On SysV and SunOS 4.0.3_EXPORT (therefore probably BSD systems in >general??) Nope. SunOS picked "dirname" up from S5, not from BSD. ----------------------------- From: Philip Hall <phil@dprmpt.uucp> Subject: fuser for sco unix v3.2.1 Keywords: fuser, sco v3.2.1 Date: 11 Aug 90 23:59:49 GMT To: info-unix@sem.brl.mil I have been trying to port the fuser.c source that can be found on uunet to the sco unix v3.2.1. Has anyone had any success doing this, and if so, can you mail me info on how to do it. The version of fuser.c that i got from uunet is realying on a tune structure being defined in tuneable.h. the structure is there, but not the info that fuser is expecting. i can hard code these values (nfile, nproc ...) but i don't know if there is anything else it is looking for. i would rather not re-envent the wheel if someone has already done so. i was surprised that sco doesn't provide fuser as a standard package. thanks for any help Philip Hall Sys admin Data Prompt Inc. Silver Spring Md. uunet!dprmpt!phil ----------------------------- From: flatau <flatau@handel.cs.colostate.edu> Subject: "make" file question Date: 12 Aug 90 00:18:43 GMT Sender: news@ccncsu.colostate.edu To: info-unix@sem.brl.mil I have the following "makefile" file PAT=/ub/path/ FILES=a.f b.f NEW=$(PAT)$(FILES) all: echo $(NEW) =========================== The output from this "make" is /ub/path/a.f b.f but I would like to have /ub/path/a.f /ub/path/b.f Well, the question is: How to append prefix (/ub/path/) to a list of files using "make". flatau@handel.cs.colostate.edu ----------------------------- From: flatau <flatau@handel.cs.colostate.edu> Subject: "make" file question Date: 12 Aug 90 00:18:43 GMT Sender: news@ccncsu.colostate.edu To: info-unix@sem.brl.mil I have the following "makefile" file PAT=/ub/path/ FILES=a.f b.f NEW=$(PAT)$(FILES) all: echo $(NEW) =========================== The output from this "make" is /ub/path/a.f b.f but I would like to have /ub/path/a.f /ub/path/b.f Well, the question is: How to append prefix (/ub/path/) to a list of files using "make". flatau@handel.cs.colostate.edu ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: Timeout on shell command. Date: 12 Aug 90 01:24:12 GMT Sender: news@convex.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <BRISTER.90Aug10222433@westworld.decwrl.dec.com> brister@decwrl.dec.com (James Brister) writes: >I'd like to have a shell script run a command, but if that command doesn't >finish in X seconds, then the script should kill it, if the command >finishes sooner then the script should immediately continue. Any ideas on >how one could achieve this? Here's timeout.c; syntax is 'timeout seconds command'. --tom #include <stdio.h> #include <signal.h> #include <sysexits.h> #include <sys/wait.h> int pid,count; union wait status; int bang(); char **commands; main(ac,av) char **av; { if (ac < 3) { usage: fprintf (stderr, "usage: %s seconds command\n",*av); exit (EX_USAGE); } if ((count=atoi(av[1])) < 1) { fprintf (stderr, "seconds (%s) malformed or nonpositive\n",av[1]); goto usage; } commands = &av[2]; switch (pid=fork()) { default: parent(); /* NOTREACHED */ break; case 0: child(); /* NOTREACHED */ case -1: perror("fork"); exit(EX_OSERR); /* NOTREACHED */ } } parent() { (void) signal(SIGALRM,bang); alarm(count); while(wait(&status) != pid) /* VOID */; if (WIFSIGNALED(status)) exit(-status.w_termsig); exit(status.w_retcode); } bang() { fprintf(stderr,"Timeout!\n"); (void) signal(SIGALRM,SIG_DFL); (void) kill(pid,SIGTERM); if (kill(pid,0)) { sleep(1); (void) kill(pid,SIGKILL); } exit(EX_TEMPFAIL); } child() { execvp(*commands,commands); perror(*commands); _exit(EX_DATAERR); /* NOTREACHED */ } /* lint output: * timeout.c: */ -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in <sys/errno.h>: Editor too big!" ----------------------------- From: Peter Morreale <morreale@bierstadt.scd.ucar.edu> Subject: make SUFFIXES question..... Date: 12 Aug 90 05:08:50 GMT Sender: news@ncar.ucar.edu To: info-unix@sem.brl.mil Ok all you make wizards, I've got a good one for ya.... Consider the following makefile: ---------------------clip here------------------------- .pp.o: cp $*.pp $*.f .SUFFIXES: $(SUFFIXES) .pp FILES= f1.o compile: $(FILES) @echo "Why isn't .f.o applied?" clean: -rm -f $(FILES) *.f ----------------------clip here-------------------------- Create "f1.pp" and type make. You'll notice that the ".pp.o" rule is executed, and then the compile rule. The question is: Why isn't the default ".f.o" rule executed before the "compile" target? (If you type make again, the ".f.o" rule is executed and all is well....) It seems to me that the sequence of events should be: .pp.o .f.o compile I did a make -dd on this to obtain a listing, but I can't seem to decifer the output. It (the output is enclosed below) I executed this makefile on SunOS 4.0.3c and UNICOS 5.1 with identical results. Thanks for any and all help, -PWM ----------------"make -dd" output------------------------- MAKEFLAGS value: stat(default.mk) doname(default.mk) Looking for % rule for default.mk find_double_suffix_rule(default.mk) find_suffix_rule(default.mk,default.mk,) stat(/usr/include/make/default.mk) doname(/usr/include/make/default.mk) Looking for % rule for /usr/include/make/default.mk find_double_suffix_rule(/usr/include/make/default.mk) find_suffix_rule(/usr/include/make/default.mk,/usr/include/make/default.mk,) SUFFIXES= .o .c .c~ .s .s~ .S .S~ .ln .f .f~ .F .F~ .l .l~ .mod .mod~ .sym .def .def~ .p .p~ .r .r~ .y .y~ .h .h~ .sh .sh~ .cps .cps~ OUTPUT_OPTION = CC= cc CFLAGS = CPPFLAGS = LINT= lint LINTFLAGS = COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) LINT.c= $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH) YACC= yacc YFLAGS = YACC.y= $(YACC) $(YFLAGS) LEX= lex LFLAGS = LEX.l= $(LEX) $(LFLAGS) -t FC= f77 FFLAGS = COMPILE.f= $(FC) $(FFLAGS) $(TARGET_ARCH) -c LINK.f= $(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH) COMPILE.F= $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c LINK.F= $(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) RFLAGS = COMPILE.r= $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c LINK.r= $(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH) M2C= m2c M2FLAGS = MODFLAGS = DEFFLAGS = COMPILE.def= $(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH) COMPILE.mod= $(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH) PC= pc PFLAGS = COMPILE.p= $(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c LINK.p= $(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) AS= as ASFLAGS = COMPILE.s= $(AS) $(ASFLAGS) $(TARGET_MACH) COMPILE.S= $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c LD= ld LDFLAGS = LDLIBS = MAKE= make RM= rm -f AR= ar ARFLAGS= rv GET= /usr/sccs/get GFLAGS = HOME= /u1/morreale TERM= adm3a USER= morreale PATH= /u3/gnu/sun4/usr/local/bin:/bin:/usr/ucb:/u1/morreale/bin:.:/usr/bin/X11:/usr/bin:/usr/etc:/usr/local/bin LOGNAME= morreale PWD= /u1/morreale/flatau DISPLAY= laplata:0.0 TERMCAP= la|adm3a|3a:am:do=^J:le=^H:bs:cm=\E=%+\040%+\040:cl=1^Z:co#80:ho=^^:li#24:ma=^K^P:nd=^L:up=^K: EDITOR= /usr/ucb/vi EKBD= vt100 GRAPHCAP= X11 MAP3270= /u1/morreale/.map3270 VISUAL= /usr/ucb/vi PRINTER= scdimagen VIRTUAL_ROOT= / stat(.make.state) MAKEFLAGS= stat(makefile) doname(makefile) Looking for % rule for makefile find_double_suffix_rule(makefile) find_suffix_rule(makefile,makefile,) FILES= f1.o stat(.INIT) doname(.INIT) Looking for % rule for .INIT find_double_suffix_rule(.INIT) stat(compile) doname(compile) @ = stat(f1.o) doname(f1.o) Looking for % rule for f1.o find_double_suffix_rule(f1.o) find_suffix_rule(f1.o,f1,.o) build_suffix_list(.o) .c.o .s.o .S.o .f.o .F.o .l.o .mod.o .p.o .r.o .y.o .pp.o Trying f1.c Trying f1.s Trying f1.S Trying f1.f Trying f1.F Trying f1.l Trying f1.mod Trying f1.p Trying f1.r Trying f1.y Trying f1.pp stat(f1.pp) doname(f1.pp) Looking for % rule for f1.pp find_double_suffix_rule(f1.pp) find_suffix_rule(f1.pp,f1,.pp) build_suffix_list(.pp) Found f1.pp Date(f1.pp)=Sat Aug 11 18:23:07 1990 Date-dependencies(f1.o)=File does not exist Building f1.o using suffix rule for .pp.o because it is out of date relative to f1.pp find_suffix_rule(f1.o,f1.o,) build_suffix_list() .c .f .F .l .mod .p .r .y .sh Trying f1.o.c Trying f1.o.f Trying f1.o.F Trying f1.o.l Trying f1.o.mod Trying f1.o.p Trying f1.o.r Trying f1.o.y Trying f1.o.sh @= f1.o *= f1 <= f1.pp % = ? = f1.pp @ = * = < = % = ? = cp f1.pp f1.f stat(.make.state) stat(f1.o) Date(f1.o)=Younger than any file Date-dependencies(compile)=File does not exist Building compile because it is out of date relative to f1.o Looking for % rule for compile find_double_suffix_rule(compile) @= compile * = < = % = ? = f1.o @ = * = < = % = ? = Why .f.o is not being applied stat(.make.state) stat(compile) stat(.DONE) doname(.DONE) Looking for % rule for .DONE find_double_suffix_rule(.DONE) -- ------------------------------------------------------------------ Peter W. Morreale email: morreale@ncar.ucar.edu Nat'l Center for Atmos Research voice: (303) 497-1293 Scientific Computing Division ----------------------------- From: John G Dobnick <jgd@csd4.csd.uwm.edu> Subject: link (ln) with *one* name? Date: 12 Aug 90 05:34:12 GMT Sender: news@uwm.edu To: info-unix@sem.brl.mil Stupid question time (I haven't asked one of these for a while, so I'm due. :-) ] Re: 4.3 "ln". The manpage says ln(1) can be called with only one name. What purpose does this serve? Given that ln(1) is supposed to create "links", I would think you need a minimum of *two* filenames, no? What am I missing here? Manpage extract: LN(1) UNIX Programmer's Manual LN(1) NAME ln - make links SYNOPSIS ln [ -s ] sourcename [ targetname ] ln [ -s ] sourcename1 sourcename2 [ sourcename3 ... ] targetdirectory DESCRIPTION Given one or two arguments, ln creates a link to an existing file sourcename. If targetname is given, the link has that name; targetname may also be a directory in which to place the link; otherwise it is placed in the current directory. If only the directory is specified, the link will be made to the last component of sourcename. The first line under DESCRIPTION can be read as "Given one argument, _ln_ creates a link to an existing file _sourcename_." Um, excuse me, but *what* link to _sourcename_????? Seems to me you need a minimum of two (2) arguments here to do anything useful. Am I correct in assuming that this is just a case of unclear writing? Or am I missing something obvious? (And if so, what?) Nitpickingly, -- John G Dobnick (JGD2) Computing Services Division @ University of Wisconsin - Milwaukee INTERNET: jgd@csd4.csd.uwm.edu ATTnet: (414) 229-5727 UUCP: uunet!uwm!csd4.csd.uwm.edu!jgd "Knowing how things work is the basis for appreciation, and is thus a source of civilized delight." -- William Safire ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@ecf.ncsl.nist.gov (SMTP MAILER) (08/13/90)
----Reason for mail failure follows---- Sending mail to host ecf.ncsl.nist.gov : Fatal reply code to command 'RCPT TO:<ise.ncsl.nist.gov@ecf.ncsl.nist.gov>': 550 User "ise.ncsl.nist.gov" Unknown. ----Transcript of message follows---- Date: 13 Aug 90 06:38:00 EST From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#115 To: "ise.ncsl.nist.gov" <ise.ncsl.nist.gov@ecf.ncsl.nist.gov> Return-Path: <unixinfo-request@ecf.ncsl.nist.gov> Received: from SEM.BRL.MIL by ecf.ncsl.nist.gov with SMTP ; Mon, 13 Aug 90 06:37:59 EST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab02332; 13 Aug 90 6:01 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa02326; 13 Aug 90 5:45 EDT Date: Mon, 13 Aug 90 05:45:26 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#115 Message-ID: <9008130545.aa02326@SEM.BRL.MIL> INFO-UNIX Digest Mon, 13 Aug 1990 V10#115 Today's Topics: Re: 'foo bar' <- What's the meaning of? Re: How to tell if a process exists System VR4/i386 - when ? Re: Millisecond clock Re: Suid script security Re: Working with sed fuser for sco unix v3.2.1 Re: the f2c program Re: Timeout on shell command. ----------------------------------------------------------------- From: George Turczynski <george@hls0.hls.oz> Subject: Re: 'foo bar' <- What's the meaning of? Keywords: foo bar Date: 10 Aug 90 00:28:36 GMT To: info-unix@sem.brl.mil As you can see from the subject line, "foo bar" came from "fubar". I think this MUST be in one of the FAQ lists, no ? Ich hoffe dass das genug klar ist. -- | George P. J. Turczynski. |---------------------------------------------------- | Computer Systems Engineer. | ACSnet: george@highland.oz | I can't speak for the | | Highland Logic Pty. Ltd. | Phone: +61 48 683490 | company, I can barely | | Suite 1, 348-354 Argyle St | Fax: +61 48 683474 | speak for myself... | | Moss Vale. NSW. Australia. 2577 |---------------------------------------------------- ----------------------------- From: Sam Bassett RCS <samlb@pioneer.arc.nasa.gov> Subject: Re: How to tell if a process exists Date: 11 Aug 90 06:20:20 GMT Sender: news@amelia.nas.nasa.gov To: info-unix@sem.brl.mil Ooops -- yer right -- my mistake. Sorrreee..... Sam'l Bassett, Sterling Software @ NASA Ames Research Center, Moffett Field CA 94035 Work: (415) 604-4792; Home: (415) 969-2644 samlb@well.sf.ca.us samlb@ames.arc.nasa.gov <Disclaimer> := 'Sterling doesn't _have_ opinions -- much less NASA!' ----------------------------- From: Per Andersson <perand@admin.kth.se> Subject: System VR4/i386 - when ? Date: 11 Aug 90 12:35:19 GMT To: info-unix@sem.brl.mil Has anybody seen a sold rel4 for the 386 ? Can anybody quote a price ? This has to be the best vapourware of 1990. In January agents promised 'it would be for sale in a couple of weeks'. The market is probably screwed because it's too many home systems and too many poor system managers which doesn't make good customers. So why worry their heads with all this new stuff ?. SCO has no plan when r4 will be considered, and Interactive just released 2.2. Why not concentrate on getting the enhancement working on r4 instead ? r4 working on ICLs machines doesn't help one bit because the big 386 market couldn't afford one, and should better buy a Sparcstation SLC, 'cos thats not more expensive than a top end 386, and runs DOS programs, just like the 386. WHEN WILL I BE ABLE TO BUY SYSTEM V rel 4 FOR THE i386 ? Per -- --- Per Andersson Royal Institute of Technology, Stockholm, Sweden perand@admin.kth.se, @nada.kth.se ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Millisecond clock Keywords: HP-UX SYSV Date: 11 Aug 90 20:55:54 GMT To: info-unix@sem.brl.mil >The folowing program for millisecond sleep works under HP-UX SYSV, so >it should work on an ATT (serious finger crossing :-). Crossing the fingers is a good idea here. "Xxx works under HP-UX SYSV, therefore it should work on an [arbitrary] ATT [System V release]" isn't a valid deduction. While some systems, including HP-UX, have "setitimer()", which your program uses, vanilla AT&T System V releases prior to S5R4 don't have it. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Suid script security Date: 11 Aug 90 21:01:33 GMT To: info-unix@sem.brl.mil >Now, what if the name of the very shell script were e.g. "-i"? Wouldn't that >give a nice exec? > > execl("/bin/sh", "sh", "-i", (char *) 0); > >So link the script to a file named "-i", and voila! >Yes, one needs write permission somewhere on the same device, if one's >operating system doesn't support symbolic links. > >What about the csh command interpreter? Well, 4.2BSD provides us with a csh >which has a NEW option: "-b"! Its goal is to avoid just the thing described >above: Whereas the Bourne shell already has an option whose effect is to avoid the thing just described above - "-". Yup, just a dash by itself, as in #! /bin/sh - >the mnemonic for `b' is `break'; To quote the C shell source code: case 'b': /* -b Next arg is input file */ batch++; so I don't think the mnemonic was intended to be "break".... ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Working with sed Date: 11 Aug 90 21:04:08 GMT To: info-unix@sem.brl.mil >On SysV and SunOS 4.0.3_EXPORT (therefore probably BSD systems in >general??) Nope. SunOS picked "dirname" up from S5, not from BSD. ----------------------------- From: Philip Hall <phil@dprmpt.uucp> Subject: fuser for sco unix v3.2.1 Keywords: fuser, sco v3.2.1 Date: 11 Aug 90 23:59:49 GMT To: info-unix@sem.brl.mil I have been trying to port the fuser.c source that can be found on uunet to the sco unix v3.2.1. Has anyone had any success doing this, and if so, can you mail me info on how to do it. The version of fuser.c that i got from uunet is realying on a tune structure being defined in tuneable.h. the structure is there, but not the info that fuser is expecting. i can hard code these values (nfile, nproc ...) but i don't know if there is anything else it is looking for. i would rather not re-envent the wheel if someone has already done so. i was surprised that sco doesn't provide fuser as a standard package. thanks for any help Philip Hall Sys admin Data Prompt Inc. Silver Spring Md. uunet!dprmpt!phil ----------------------------- From: Henry Spencer <henry@zoo.toronto.edu> Subject: Re: the f2c program Date: 12 Aug 90 00:58:36 GMT To: info-unix@sem.brl.mil In article <1990Aug11.202542.9891@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: >On the computer research.att.com is a program called "f2c". It converts >Fortran programs to, mostly, C. But it does NOT convert Fortran IO >calls to C. Instead it just invokes some mysterious io routines. I >take these to be somebody's Fortran IO runtime library... whose will this >thing work with???? Also on research.att.com, in the same directory, are files named "libF77.Z" and "libi77.Z", which might be worth investigating. -- It is not possible to both understand | Henry Spencer at U of Toronto Zoology and appreciate Intel CPUs. -D.Wolfskill| henry@zoo.toronto.edu utzoo!henry ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: Timeout on shell command. Date: 12 Aug 90 01:24:12 GMT Sender: news@convex.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <BRISTER.90Aug10222433@westworld.decwrl.dec.com> brister@decwrl.dec.com (James Brister) writes: >I'd like to have a shell script run a command, but if that command doesn't >finish in X seconds, then the script should kill it, if the command >finishes sooner then the script should immediately continue. Any ideas on >how one could achieve this? Here's timeout.c; syntax is 'timeout seconds command'. --tom #include <stdio.h> #include <signal.h> #include <sysexits.h> #include <sys/wait.h> int pid,count; union wait status; int bang(); char **commands; main(ac,av) char **av; { if (ac < 3) { usage: fprintf (stderr, "usage: %s seconds command\n",*av); exit (EX_USAGE); } if ((count=atoi(av[1])) < 1) { fprintf (stderr, "seconds (%s) malformed or nonpositive\n",av[1]); goto usage; } commands = &av[2]; switch (pid=fork()) { default: parent(); /* NOTREACHED */ break; case 0: child(); /* NOTREACHED */ case -1: perror("fork"); exit(EX_OSERR); /* NOTREACHED */ } } parent() { (void) signal(SIGALRM,bang); alarm(count); while(wait(&status) != pid) /* VOID */; if (WIFSIGNALED(status)) exit(-status.w_termsig); exit(status.w_retcode); } bang() { fprintf(stderr,"Timeout!\n"); (void) signal(SIGALRM,SIG_DFL); (void) kill(pid,SIGTERM); if (kill(pid,0)) { sleep(1); (void) kill(pid,SIGKILL); } exit(EX_TEMPFAIL); } child() { execvp(*commands,commands); perror(*commands); _exit(EX_DATAERR); /* NOTREACHED */ } /* lint output: * timeout.c: */ -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in <sys/errno.h>: Editor too big!" ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/19/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 15 Aug 90 06:28:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#117 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Wed, 15 Aug 90 06:08:38 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ad10635; 15 Aug 90 5:56 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa10626; 15 Aug 90 5:46 EDT Date: Wed, 15 Aug 90 05:45:41 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#117 Message-ID: <9008150546.aa10626@SEM.BRL.MIL> INFO-UNIX Digest Wed, 15 Aug 1990 V10#117 Today's Topics: Re: How to tell if a process exists Re: System VR4/i386 - when ? Re: "make" file question Re: OK, so who runs SVR4 ?? Re: AWK Language Question Re: reliable reads from pipes Cross-compatibility of QIC tarfiles Re: <None> awk errors System-dependent manifest constants (i.e., 'i386', 'mips', 'vax') Re: -F option for awk Restricting a user Re: What's wrong with this Bourne shell script? Having a conference instead of 'talk'? Re: link (ln) with *one* name? readdir and such My post didn't work? Re: My post didn't work? Way over my head! Recursion without -R Re: Recursion without -R Re: make SUFFIXES question..... Korn-shell info needed Re: uucico hanging. LBOLT??? SCO Mailing List non-interactine telnet session make(1) question Re: Checkpoints for large jobs Re: help sought - securing a terminal/line RE: 'foo bar' <- What's the meaning of? rogue df processes snarfing cpu How to issue a C SHELL command within a C program Re: How to issue a C SHELL command with need help with FATAL error in unix 3.2u CVS Questions BSD references directory reading VMS compress utility ELF object formats for i386 (V.4) A non-shell outable editor ----------------------------------------------------------------- From: Bob Fisher <nts0302@dsacg3.dsac.dla.mil> Subject: Re: How to tell if a process exists Date: 13 Aug 90 11:51:34 GMT To: info-unix@sem.brl.mil From article <13534@smoke.BRL.MIL>, by gwyn@smoke.BRL.MIL (Doug Gwyn): } In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: } -In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: } ->Wrong. RTFM -- kill(pid, 0) } - Hmmm -- must be running Reverse Polish Unix down under, 'cause my } -manual sez: " kill [-sig] processid... ", and I've been doing it that way } -for a looooooooong time. } } Doing what, incorrectly reading your manual? They're both right. They're just reading different sections of the manual. -- Bob Fisher US Defense Logistics Agency Systems Automation Center DSAC-TSX, Box 1605, Columbus, OH 43216-5002 614-238-9071 (AV 850-9071) bfisher@dsac.dla.mil osu-cis!dsacg1!bfisher ----------------------------- From: Rchard Ducoty <rduc@uport.uucp> Subject: Re: System VR4/i386 - when ? Keywords: V4 Date: 13 Aug 90 15:22:32 GMT To: info-unix@sem.brl.mil In article <1990Aug11.123519.21964@kth.se> perand@admin.kth.se (Per Andersson) writes: > >WHEN WILL I BE ABLE TO BUY SYSTEM V rel 4 FOR THE i386 ? ============= Now ! Yesterday ! Call Microport @ 1-408-438-8649 Richard ----------------------------- From: "D'Arcy J.M. Cain" <darcy@druid.uucp> Subject: Re: "make" file question Date: 13 Aug 90 15:23:59 GMT To: info-unix@sem.brl.mil In article <8427@ccncsu.ColoState.EDU> flatau@handel.UUCP (flatau) writes: >I have the following "makefile" file > >PAT=/ub/path/ >FILES=a.f b.f >NEW=$(PAT)$(FILES) >all: > echo $(NEW) > >=========================== >The output from this "make" is > /ub/path/a.f b.f > >but I would like to have >/ub/path/a.f /ub/path/b.f > >Well, the question is: How to append prefix (/ub/path/) to >a list of files using "make". > I use GNU make and I do this with the following: NEW=$(foreach i, $(FILES), $(PAT)$i) -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | MS-DOS: The Andrew Dice Clay West Hill, Ontario, Canada | of operating systems. + 416 281 6094 | ----------------------------- From: Rchard Ducoty <rduc@uport.uucp> Subject: Re: OK, so who runs SVR4 ?? Keywords: V4 Date: 13 Aug 90 15:41:02 GMT To: info-unix@sem.brl.mil In article <1990Aug6.121634.176@aim1.uucp> deon@aim1.uucp (Deon Botha) writes: >From article <736@pcsbst.pcs.com>, by mike@cochise.pcs.com (Mike Schroeder): >> >> the subject line really says all: what system vendors/software vendors >> are supplying SVR4 for _real live_ systems today? >> If any: who for what system? ============== Microport is also shipping V4 for 386/486 machines (ISA) Richard Ducoty Microport Scotts Valley, CA 408 438-8649 ----------------------------- From: Norman Joseph <norm@oglvee.uucp> Subject: Re: AWK Language Question Date: 13 Aug 90 16:39:31 GMT To: info-unix@sem.brl.mil In <972@richsun.cpg.trs.reuter.com>, boi@richsun.cpg.trs.reuter.com (Ken Boi) writes: >According to the book "The AWK Programming Language", there >are built-in string functions. One of them is 'gsub'. I have >tried using it with the following comand line statement which >is very close to the example in the book: > [...] >I get the error messages: > awk: syntax error near line 1 > awk: illegal statement near line 1 >Anybody know why? The awk you are running on your system (you don't tell us what you have) is an earlier version of the one described in _The_AWK_Programming_Language_, which is a (relatively) recent update. If your system is like some, you may have the new version of awk listed under the name "nawk" (new awk). -- Norm Joseph cgh!amanue!oglvee!norm@dsi.com Oglevee Computer Systems, Inc. {pitt,cgh}!amanue!oglvee!norm "Shucking Usenet oysters in pursuit of a pearl." -- Bill Kennedy ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: AWK Language Question Date: 14 Aug 90 18:13:30 GMT To: info-unix@sem.brl.mil >Otherwise, you can obtain the new flavor of awk from the AT&T UNIX >System ToolChest, or from UNIX System V Release 3.2 or later, It first appeared in S5R3.1. ----------------------------- From: "stephen.a.rago" <sar0@cbnewsl.att.com> Subject: Re: reliable reads from pipes Date: 13 Aug 90 17:12:23 GMT To: info-unix@sem.brl.mil In article <1827@necisa.ho.necisa.oz>, boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: > In article <11155@alice.UUCP> andrew@alice.UUCP (Andrew Hume) writes: > > > > lest anyone start relying on reads returning whatever is in the pipe, > >9th edition and later unices preserved the size of the writes which can > >now also exceed the size of the pipe buffer (i think). > > Not to mention the 1 byte write nasty that will take out all your > stream message buffers. The stream pipe fills when the write > side high water mark is hit; which is tunable. SVR4 won't let someone "take all the stream message buffers" unless they are running as root. And it's not message buffers, its general memory out of the kernel memory pool. > > Those M_DELIM's are neat... > M_DELIM's are old. In V10 it's a flag in the message header (except for the message line discipline). SVR4 also has delimiters, if you want to use them. Steve Rago sar@attunix.att.com ----------------------------- From: "Gary M. Lin" <skidrow@ceres.ucsc.edu> Subject: Cross-compatibility of QIC tarfiles Keywords: QIC tar compatibility Date: 13 Aug 90 17:34:38 GMT Sender: usenet@darkstar.ucsc.edu To: info-unix@sem.brl.mil I'm interested in moving up to QIC backups, instead of the standard 9-track reels I have. I have access to QIC units on an IBM RS/6000 and a Sun workstation. My question is can I read-in tarfiles written on another UNIX system, if they are both set on the same length, density and formatting specs? The RS/6000 supports DC-300XLP, and I believe the Sun also. I would like comments from anyone who does this regularly. Thanks in advance, - Gary M. Lin skidrow@ceres.ucsc.edu ----------------------------- From: "Roger B.A. Klorese" <rogerk@mips.com> Subject: Re: <None> Keywords: Fortran Date: 13 Aug 90 20:17:10 GMT Sender: news@mips.com To: info-unix@sem.brl.mil In article <1990Aug5.192922.20989@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: >The $ is not a standard F77 feature. Yet it IS documented to do what >I want in the Mips Fortran manual. It doesn't work: I have to type >two carriage returns to get input, which comes in wrong. > >How does one do this in Mips Fortran, or in general on common Unix Fortrans. This is a bug in Mips Fortran releases 1.31 and 2.0. Upgrade to release 2.10 (if you are running pre-4.50 RISC/os) or 2.11 (for 4.50). -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 MS 4-02 950 DeGuigne Dr. Sunnyvale, CA 94086 voicemail: +1 408 524-7421 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I'm the NLA" "If the world were a logical place, men would ride sidesaddle." -Rita Mae Brown ----------------------------- From: "William (Bill" <mayne@vsserv.scri.fsu.edu> MMDF-Warning: Parse error in original version of preceding line at BRL.MIL Subject: awk errors Keywords: QIC tar compatibility Date: 13 Aug 90 20:34:00 GMT Sender: news@sun13.scri.fsu.edu To: info-unix@sem.brl.mil In my earlier post on this question all but the last paragraph got lost somehow. The part which showed up on the net wouldn't make much sense, so I'll summarize again. My apologies for the confusion. Using awk on a Sun 3 run SunOS 4.0 I sometimes get either bus errors or segmentation faults in the awk interpreter. Although I sometimes find errors in the awk program which I was trying to interpret (no thanks to the graceful error handling) I regard this as a bug. An interpreter or compiler shouldn't fail like that no matter what the input is. But I know I have to learn to live with it the way it is. If anyone out there has learned some techniques to help locate the error in a case like this, or has discovered what patterns of source code errors cause this interpreter [mis]behavior please enlighten me. Email responses preferred. I will summarize if others show interest. ----------------------------- From: Warren Tucker <wht@n4hgf.mt-park.ga.us> Subject: System-dependent manifest constants (i.e., 'i386', 'mips', 'vax') Keywords: i386 M_SYS5 sequent m68k vax etc.... Date: 13 Aug 90 21:27:59 GMT Followup-To: poster To: info-unix@sem.brl.mil I would like to compile a list of pre-defined manifest constants supplied by various C compilers. I have: M_I186 M_I286 M_I386 M_I8086 M_I86 M_INTERNAT M_SYS5 M_UNIX M_XENIX i386 i486 m68k mips pdp11 pyr sequent sun sun2 sun3 sun4 vax If your compiler supplies predefined constants separately for the OS, compiler or hardware type, please differentiate among them. Please e-mail and I will summarize if there is any interest. Thanks. ----------------------------------------------------------------------- Warren Tucker, TuckerWare gatech!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US "Tell the moon; don't tell the March Hare: He is here. Do look around." ----------------------------- From: Roger Rohrbach <roger@yuba.wrs.com> Subject: Re: -F option for awk Keywords: awk field-separator Date: 13 Aug 90 21:41:03 GMT Sender: news@wrs.wrs.com To: info-unix@sem.brl.mil rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >When awk'ing something like a passwd file, where the reasonable choice >of field separator is something other than whitespace, how do you >let a line simply fall through and be printed unchanged? >print; or print $0; don't do the right thing because the lines come >out with spaces as the field separators instead of the character given >to the -F option. I don't know what version of awk you are using; both the old and GNU versions of awk print the input line unchanged unless you explicitly reset the OFS (output field separator) variable. I.e, awk -F: '{ print }' /etc/passwd prints /etc/passwd unchanged. As a matter of fact, if you want the behavior you claim to be experiencing, you not only have to set OFS, but you have to mess with one of the fields in order to get awk to recompute $0, i.e., awk -F: ' BEGIN { OFS = " " } { $1 = $1 # recompute $0 print }' /etc/passwd produces the behavior you describe. Perhaps "new awk" behaves differently; in that case, try setting OFS to FS and use this trick. Roger Rohrbach sun!wrs!roger roger@wrs.com - Eddie sez: ----------------------------------------------- (c) 1986, 1990 -. | {o >o | | \ -) I'm lurching between the aesthetic sublime and the quotidian grime. | ----------------------------- From: George Turczynski <george@hls0.hls.oz> Subject: Re: -F option for awk Keywords: awk field-separator Date: 14 Aug 90 00:03:36 GMT To: info-unix@sem.brl.mil In article <491@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: > When awk'ing something like a passwd file, where the reasonable choice > of field separator is something other than whitespace, how do you > let a line simply fall through and be printed unchanged? > I must have misunderstood your question. This works fine: tmp: awk -F: '{ if( $1 == "nobody" ) print }' /etc/passwd nobody:*:-2:-2::/: This is under SunOS 4.0.3, and works for both sh & csh. I don't know what you're running, but it might have been useful to know >:-} -- | George P. J. Turczynski. |---------------------------------------------------- | Computer Systems Engineer. | ACSnet: george@highland.oz | I can't speak for the | | Highland Logic Pty. Ltd. | Phone: +61 48 683490 | company, I can barely | | Suite 1, 348-354 Argyle St | Fax: +61 48 683474 | speak for myself... | | Moss Vale. NSW. Australia. 2577 |---------------------------------------------------- ----------------------------- From: "John R. Schutz" <john@csrnxt1.ae.utexas.edu> Subject: Restricting a user Keywords: Restrict, No access Date: 13 Aug 90 22:34:06 GMT Sender: news@ut-emx.uucp To: info-unix@sem.brl.mil Howdy y'all. I have what (should be) a quick question. I want to restrict a certain users access to just reading news. No more than that. I use the nn news reader. I have tried defining his login shell to the nn binary, but the problem comes with terminal emulations. I need to be able to setenv TERM vt100 (or the equivalent) before he can use nn...then when he quits nn, it should log him off...any suggestions? john -- | John R. Schutz | Internet&NeXTmail: john@csrnxt1.ae.utexas.edu | | Center for Space Research | Standard Disclaimer | "I'm mentally | | Programmer (NeXT) | unstable, cracked, and clinically insane. | | Etc. | Besides that, I'm perfectly normal." -me | ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 13 Aug 90 23:11:08 GMT Sender: fpb@ittc.wec.com To: info-unix@sem.brl.mil In article <1474@chinacat.Unicom.COM> chip@chinacat.Unicom.COM (Chip Rosenthal) writes: >If you snarfed the "stat" program I posted to alt.sources recently, >I'd suggest: > echo 0`stat -s * | sed -e 's/.*:/+/'` | bc >or if you have Jon's addcol, even simpler: > stat -s * | addcol -2 Where is Jon's addcol. I tried to write one a while back and kept screwing it up. I would like to see a working version. -- Frank P. Bresz }*{ ITTC Network Administrator +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: What's wrong with this Bourne shell script? Date: 14 Aug 90 17:10:56 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | >or if you have Jon's addcol, even simpler: | | > stat -s * | addcol -2 | | Where is Jon's addcol. I tried to write one a while back and kept | screwing it up. I would like to see a working version. for addcol -1, try: perl -ane '$s += $F[0]; print "$s\n" if eof;' for addcol -2: perl -ane '$s += $F[1]; print "$s\n" if eof;' Others may be derived by noticing the pattern. :-) Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Hla Tun "Tim" Thein <thein@boole.seas.ucla.edu> Subject: Having a conference instead of 'talk'? Keywords: talk Date: 14 Aug 90 00:18:25 GMT Sender: news@seas.ucla.edu To: info-unix@sem.brl.mil I would like to be able to talk to one or more people at the same time on the computer at the same time. Could anyone please tell me where I could find a program similar to 'talk' where two or more people could have a conference through computers on the internet? Please reply to the address below since I do not frequently read this newsgroup. Hla Tun "Tim" Thein ......__ __ _____ _____ (thein@boole.seas.ucla.edu) ////// /_/ //_ _//_ _/ Computer Science & Engineering ///// __ / / / / / University of California, Los Angeles ////_/ /_/o /_/o /_/o -- Hla Tun "Tim" Thein ......__ __ _____ _____ (thein@boole.seas.ucla.edu) ////// /_/ //_ _//_ _/ Computer Science & Engineering ///// __ / / / / / University of California, Los Angeles ////_/ /_/o /_/o /_/o ----------------------------- From: "Roger B.A. Klorese" <rogerk@mips.com> Subject: Re: link (ln) with *one* name? Date: 14 Aug 90 01:30:10 GMT Sender: news@mips.com To: info-unix@sem.brl.mil In article <5698@uwm.edu> jgd@csd4.csd.uwm.edu (John G Dobnick) writes: >Stupid question time (I haven't asked one of these for a while, so >I'm due. :-) ] > > >Re: 4.3 "ln". The manpage says ln(1) can be called with only one name. > What purpose does this serve? Given that ln(1) is > supposed to create "links", I would think you need a > minimum of *two* filenames, no? What am I missing > here? ln -s /some/other/dir/foo creates a link called "foo" in the current directory. -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 MS 4-02 950 DeGuigne Dr. Sunnyvale, CA 94086 voicemail: +1 408 524-7421 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I'm the NLA" "If the world were a logical place, men would ride sidesaddle." -Rita Mae Brown ----------------------------- From: Sameer Parekh <zane@ddsw1.mcs.com> Subject: readdir and such Date: 14 Aug 90 03:43:30 GMT To: info-unix@sem.brl.mil -- ************************************************************************** * * * Sameer Parekh * * C Programmer in Training * ----------------------------- From: Sameer Parekh <zane@ddsw1.mcs.com> Subject: My post didn't work? Date: 14 Aug 90 03:46:54 GMT To: info-unix@sem.brl.mil That last post was dissolved by my .signature, (Can I delete a just posted and saved post with rn?) How do I use readdir and the functions to read the directories of a unix in C? -- ************************************************************************** * * * Sameer Parekh * * C Programmer in Training * ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: My post didn't work? Date: 14 Aug 90 17:01:29 GMT To: info-unix@sem.brl.mil In article <1990Aug14.034654.12584@ddsw1.MCS.COM> zane@ddsw1.MCS.COM (Sameer Parekh) writes: >How do I use readdir and the functions to read the directories of a unix in C? That's like asking "How do I program in C?" For what it's worth, here's the test program that I include with my public-domain distribution of POSIX directory access routines; maybe it will answer whatever your real question is. /* testdir -- basic test for C library directory access routines last edit: 25-Apr-1987 D A Gwyn */ #include <sys/types.h> #include <stdio.h> #include <dirent.h> extern void exit(); extern int strcmp(); main( argc, argv ) int argc; register char **argv; { register DIR *dirp; register struct dirent *dp; int nerrs = 0; /* total not found */ if ( (dirp = opendir( "." )) == NULL ) { (void)fprintf( stderr, "Cannot open \".\" directory\n" ); exit( 1 ); } while ( --argc > 0 ) { ++argv; while ( (dp = readdir( dirp )) != NULL ) if ( strcmp( dp->d_name, *argv ) == 0 ) { (void)printf( "\"%s\" found.\n", *argv ); break; } if ( dp == NULL ) { (void)printf( "\"%s\" not found.\n", *argv ); ++nerrs; } rewinddir( dirp ); } (void)closedir( dirp ); exit( nerrs ); } ----------------------------- From: "J. Michael Diehl" <mdiehl@hydra.unm.edu> Subject: Way over my head! Date: 14 Aug 90 08:32:06 GMT Sender: USENET News System <usenet@ariel.unm.edu> To: info-unix@sem.brl.mil Like the subject says, I think I may be out of my league as a beginning C programmer, but here it goes! I am trying to write a program that will start an ftp process in the background, write commands to the ftp's stdin and read the results from the ftp's stdout. Circular pipes? I'm hoping to do it entirely in C so as to avoid any shell programming. I'd like to have only *one* file that does it all. Now for my questions: Will a process terminate if it gets an EOF in it's stdin? Or do I have to make sure that my background ftp process always has something to read in? I am trying to fork a process. (one to do the controlling, one to do the ftp) I feel sure that the fork is working, but when I try to start ftp...well... it never starts. I'm lost. What follows is the code segment in question, followed by the out put it generates. #include <stdio.h> #include <ctype.h> #define LINE_LEN 180 #define FTP_OUT "Auto_ftp_out" #define FTP_IN "Auto_ftp_in" char cmd[LINE_LEN]; /* current command */ start_ftp() { int tmp; sprintf(cmd,"ftp < %s > %s", FTP_IN, FTP_OUT); puts(cmd); if ((tmp = fork()) == -1) { puts("Fork could not start ftp.\n"); exit(-1); } printf("%d\n",tmp); if (tmp != 0) { /* child process */ puts("Starting ftp.\n"); if (-1 == execve(cmd,cmd,"\0")) { /* magic number from manual */ puts("Execve could not start ftp.\n"); exit(-1); } } } .......and now for the output.... ftp < Auto_ftp_in > Auto_ftp_out 25024 0 Starting ftp. Execve could not start ftp. As you can see, I do get the fork to work.....but execve() returns an error. Any ideas? Note that I'm a new C programmer, and that if you've read this far, I'd like to hear any constructive comments you might have. Helping my with this problem would be nice, too! ;^] Thanx in advance. +-------------------------+----------------------------------------------------+ | J. Michael Diehl ;-] | I thought I was wrong once. But, I was mistaken. | | +----------------------------------------------------+ | mdiehl@hydra.unm.edu | "I think marriage should be a lifelong commitment."| | Thunder@forum | the man said to his new wife as he placed a pistol| | Thunder@Tiny* | on the mantle. | | (505) 272-HaHa | | +-------------------------+----------------------------------------------------+ ----------------------------- From: Robert Shaw <rjshaw@ramius.ocf.llnl.gov> Subject: Recursion without -R Keywords: recursion Date: 14 Aug 90 10:02:41 GMT Sender: usenet@llnl.llnl.gov To: info-unix@sem.brl.mil Hi. What are some quick tricks for getting programs like chmod and chown to descend into all subdirectories? Programs without a -R option, that is. ==== My earlier "awk -F" was refering to a Pyramid running OSx. Thanx to those who called OFS to my attention, and my apologies to those of who noted that awk -F on a sun works differently that I claimed in posting. ==== I'm also looking for Korn shell info... =============================================================================== rjshaw@ramius.llnl.gov _____ ____ ____ ______ R o b / / / / / / / / / / / -------- / --/ / / / / / / / / / --------------------------- /-- / / / / / / / / S h a w /____/ /_/_/ /_/_/ /_____/ The Cosby's are precisely what's wrong with television today... =============================================================================== ----------------------------- From: Shu-Wie F Chen <swfc@ulysses.att.com> Subject: Re: Recursion without -R Keywords: recursion Date: 14 Aug 90 20:31:40 GMT Sender: netnews@ulysses.att.com To: info-unix@sem.brl.mil In article <494@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: |>Hi. |> |>What are some quick tricks for getting programs like chmod and chown to |>descend into all subdirectories? Programs without a -R option, that is. |> find . -print | xargs chown foo Of course, this only works if you have xargs, which is from System V and is also available on SunOS in their System V software installation option. *swfc ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: Recursion without -R Keywords: recursion Date: 14 Aug 90 20:33:55 GMT Sender: news@convex.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <494@llnl.LLNL.GOV> rjshaw@ramius.llnl.gov writes: >What are some quick tricks for getting programs like chmod and chown to >descend into all subdirectories? Programs without a -R option, that is. Well, here's a quick way to change all files from a set of old uids and gids to new ones. In this example, I want to change group uucp to be 1789, group staff to be 666, user kirk to be 1000, and user bill to be 7777. This code traverses the file system making those changes, omitting NFS decents. This is just a fragment of a larger program that does a lot of other sanity checks and configuration stuff not included here. #!/usr/bin/perl $start = '/'; # do whole tree %nuid = ( 'kirk', 1000, 'bill', 7777 ); %ngid = ( 'staff', 666, 'uucp', 1789 ); open(FIND, "find $start \\( -fstype nfs -prune \\) -o -ls |"); while (<FIND>) { split; $uid = $gid = -1; ($file, $user, $group) = ($_[11], $_[5], $_[6]); if (defined $nuid{$user}) { $uid = $nuid{$user}; } if (defined $ngid{$group}) { $gid = $ngid{$group}; } if (($uid != -1 || $gid != -1) && !chown($uid, $gid, $file)) { warn "$0: couldn't change $file to $uid.$gid: $!\n"; } } --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in <sys/errno.h>: Editor too big!" ----------------------------- From: andre <andre@targon.uucp> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 10:57:04 GMT To: info-unix@sem.brl.mil In article <8212@ncar.ucar.edu> morreale@bierstadt.scd.ucar.edu (Peter Morreale) writes: >Consider the following makefile: > >.pp.o: > cp $*.pp $*.f > >.SUFFIXES: $(SUFFIXES) .pp >FILES= f1.o > >compile: $(FILES) > @echo "Why isn't .f.o applied?" > >clean: > -rm -f $(FILES) *.f >You'll notice that the ".pp.o" rule is executed, and then the >compile rule. The question is: Why isn't the default ".f.o" rule >executed before the "compile" target? (If you type make again, the >".f.o" rule is executed and all is well....) This is because you told make how to make a .o file from a .pp file. after the commands involved are executed, make goes on because it just did what you told it to do to get an object out of an .pp file. But! you created an .f file and no .o file. this means that you should tell make that you make a .f file or make the .o file: .pp.o: cp $< $*.f $(FCOMP) -o $*.o $*.f ^-- whatever you need to go from .f to .o (fortran?) OR .pp.f: cp $< $*.f In the second case make should add up both the .pp.f and .f.o rules to make your .o out of .pp. -- The mail| AAA DDDD It's not the kill, but the thrill of the chase. demon...| AA AAvv vvDD DD Ketchup is a vegetable. hits!.@&| AAAAAAAvv vvDD DD {nixbur|nixtor}!adalen.via --more--| AAA AAAvvvDDDDDD Andre van Dalen, uunet!hp4nl!targon!andre ----------------------------- From: Christopher R Volpe <volpe@underdog.crd.ge.com> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 22:12:45 GMT Sender: news@crdgw1.crd.ge.com To: info-unix@sem.brl.mil In article <1446@targon.UUCP>, andre@targon.UUCP (andre) writes: |>In article <8212@ncar.ucar.edu> morreale@bierstadt.scd.ucar.edu (Peter Morreale) writes: |> >Consider the following makefile: |> > |> >.pp.o: |> > cp $*.pp $*.f |> > |> >.SUFFIXES: $(SUFFIXES) .pp |> >FILES= f1.o |> > |> >compile: $(FILES) |> > @echo "Why isn't .f.o applied?" |> > |> >clean: |> > -rm -f $(FILES) *.f |> |> >You'll notice that the ".pp.o" rule is executed, and then the |> >compile rule. The question is: Why isn't the default ".f.o" rule |> >executed before the "compile" target? (If you type make again, the |> >".f.o" rule is executed and all is well....) |> |>This is because you told make how to make a .o file from a .pp file. |>after the commands involved are executed, make goes on because it just |>did what you told it to do to get an object out of an .pp file. |>But! you created an .f file and no .o file. this means that you should |>tell make that you make a .f file or make the .o file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not good enough!!! |> |>.pp.o: |> cp $< $*.f |> $(FCOMP) -o $*.o $*.f |> ^-- whatever you need to go from .f to .o (fortran?) |>OR |> |>.pp.f: |> cp $< $*.f |> |>In the second case make should add up both the .pp.f and .f.o rules |>to make your .o out of .pp. No, it won't. At least not on a Sun. From the Make User's Guide: There is no transitive closure for suffix rules. If you had a suffix rule for building, say, a .Y file from a .X file, and another for building a .Z file from a .Y file, make would not combine the rules to build a .Z file from a .X file. You must specify the intermediate steps as targets, although their entries may have null rules: trans.Z: trans.Y: If all you have is a .pp.f rule and a .f.o rule, and you say "make f1.o", one of the following must be true: a) there exists a f1.f file, or b) f1.f is EXPLICITLY listed as a target *AND* file f1.pp exists Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com ----------------------------- From: "Dik T. Winter" <dik@cwi.nl> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 23:20:08 GMT Sender: news@cwi.nl To: info-unix@sem.brl.mil In article <1446@targon.UUCP> andre@targon.UUCP (andre) writes: > $(FCOMP) -o $*.o $*.f > ^-- whatever you need to go from .f to .o (fortran?) Please, use $(FC) which is predefined on most systems, and evaluates to the fortran compiler (which can be named f77, fort, fc, fortran, ...). -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl ----------------------------- From: arcan01@cai.com Subject: Korn-shell info needed Date: 14 Aug 90 11:10:59 GMT To: info-unix@sem.brl.mil I am in need of information on how to use the Korn-shell. Any assistance would be appreciated. Thanks. arcan01@cai.com ----------------------------- From: Richard Tobin <richard@aiai.ed.ac.uk> Subject: Re: uucico hanging. LBOLT??? Keywords: Sun 2/170, SunOS 4.0 w/yapt 5.5 Date: 14 Aug 90 11:24:36 GMT To: info-unix@sem.brl.mil In article <25998@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >`lbolt' is the `lightning bolt' interrupt (shazam! :-) ), which occurs >once per second (in V6 it may have been once every 4 seconds Yes: if((time[1]&03) == 0) { ... wakeup(&lbolt); } -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin ----------------------------- From: Dave Armbrust <dma@pcssc.uucp> Subject: SCO Mailing List Date: 14 Aug 90 12:48:30 GMT Followup-To: poster To: info-unix@sem.brl.mil The Santa Cruz Operation mailing list Charter: For exchange of information and discussions regarding all products from Santa Cruz operations. This group will be beneficial to any one interested or currently using SCO products. This mailing list is a single area that discussions and information can be exchanged regarding ALL SCO products. This mailing is independent of any existing news groups. If you are currently using SCO products, interested in products from SCO or work for Santa Cruz Operations I encourage you to join the SCO mailing list. The SCO mailing list is located on the uunet host. (Thanks uunet) Send all articles or discussions to the address: uunet!sco-list or sco-list@uunet.uu.net Please send change requests to uunet!sco-list-request or sco-list-request@uunet.uu.net. If you wish to be added to this list please follow these instructions. It is important that these instructions are followed as the process is automated. 1) Mail your add request to sco-list-request@uunet. Do not send your request to uunet!sco-list as this is the address to post all articles to. 2) Include the address you wish to received the mailing at in the body of the mail message. Example to add the address dma@pcssc.com include in the body of the message the following: Add: dma@pcssc.com Note the word add starts with a capital `A` and is the first word on the line. It is also followed by a colon ':', a single blank space, an address and then a new line. Be sure to include the `:` and the blank. Do not follow the address with any comments. Bang paths are also accepted, but needs to be the the path from uunet. (i.e. pcssc!dma instead of uunet!pcssc!dma) Example: Add: pcssc!dma Do not include both forms of address as you will then get two copies of every mailing. Just do one or the other (i.e. dma@pcssc.com or pcssc!dma) Do not put the add request in the subject line as this will be ignored. 3) Once our system receives your request you will receive an acknowledgment. You will then start to get all articles posted to uunet!sco-list. 4) If you do not receive the acknowledgment and postings right away do not send a alternate address path. You may end up getting two copies of all posting using both paths. Instead mail myself at dma@pcssc.com and ask if I got the original request. ----------------------------------------------------------------------------- Dave Armbrust | uunet!pcssc!dma PC Software Systems | dma@pcssc.com or 2121 Cornell Street | owner-sco-list@uunet.uu.net Sarasota, FL 34237 | Phone: (813)365-1162 ----------------------------- From: "Joseph T. Healey" <healey@xn.ll.mit.edu> Subject: non-interactine telnet session Keywords: non-interactive telnet session Date: 14 Aug 90 13:04:51 GMT To: info-unix@sem.brl.mil Is there any way to invoke a non-interactive telnet session via a script (preferably csh or sh) ? We would like the script to: log into the target machine run an arbitrary number of commands listed in the script log out of the target machine Thanks in advance. ----------------------------- From: Oliver Laumann <net@tub.uucp> Subject: make(1) question Date: 14 Aug 90 13:19:26 GMT To: info-unix@sem.brl.mil What is /bin/make supposed to do with the following Makefile (provided that foo.c exists)? % cat Makefile .DEFAULT: echo Ouch. all: foo.o foo.o: foo.c cc -c foo.c % Note that the rule for "all" doesn't have commands. Under all versions of UNIX where I have tested it (lots!), it only compiles foo.c. GNU make, on the other hand, compiles foo.c and then executes the command under the .DEFAULT rule. The 4.3BSD manual for make(1) says that if a target must be created and there are neither any explicit commands nor a relevant built-in rule, then the commands under the .DEFAULT are executed. So GNU make seems to be correct. Is this true? If so, how can I modify the above Makefile to suppress execution of the .DEFAULT commands (provided the .DEFAULT rule must be there for other reasons)? Add a "dummy" echo command to the "all" rule? Or an empty command, i.e. just a tab character? (We don't have GNU make here.) Thanks, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP ----------------------------- From: Mike Litzkow <mike@cream.cs.wisc.edu> Subject: Re: Checkpoints for large jobs Keywords: checkpoint interrupt signal Date: 14 Aug 90 15:47:18 GMT Sender: news@spool.cs.wisc.edu To: info-unix@sem.brl.mil Yes, checkpointing is one part of the Condor system, (previously called RU). Condor uses cycles on idle workstations by migrating processes to them. When the workstations subsequently come under use by their normal users, the condor jobs are checkpointed, and later moved to another idle workstation to continue execution. The checkpointing is accomplished by causing the process to dump core, then combining parts of the core file with parts of the original executable. The software keeps track of what file have been opened and re-opens them after return from a checkpoint. This is accomplished by linking the user program with special versions of "crt0.o" and "libc.a". Condor is available without charge by anonymous ftp from "shorty.cs.wisc.edu" (128.105.2.8). Just log in as "ftp" and give your user name for a password. Then "cd" to the condor directory and take a look at the Readme file. You will be instructed to fetch a compressed binary file, remember to have your ftp set to "binary" mode for that. The checkpointing is set up so you can use it without process migration or remote execution if that is desired. It is able to run and compile on a Sequent Symmetry. -- mike ----------------------------- From: Leslie Mikesell <les@chinet.chi.il.us> Subject: Re: help sought - securing a terminal/line Date: 14 Aug 90 16:18:16 GMT To: info-unix@sem.brl.mil In article <3868@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: [ttymon] >And also gives you a few additional bells and whistles, such as >autobauding (not the bit where you hit BREAK to get it to cycle through >speeds, although "ttymon" does support that, but the bit where you type >a character and, based on what the character looked like, "ttymon" >guesses the speed of the line; same sort of thing as the 4.[23]BSD "getty" >supports). Does anything support the now-ubiquituous devices that announce the connection speed in ASCII before bringing up CD or does everyone still have to write their own code for this if they don't want the users to have to send something before getting the login prompt? Les Mikesell les@chinet.chi.il.us ----------------------------- From: Dave Holcomb <dave@hera.scs.com> Subject: RE: 'foo bar' <- What's the meaning of? Date: 14 Aug 90 16:33:51 GMT Sender: Unknown@caeco.uucp To: info-unix@sem.brl.mil In addition to the military reference to an items state of repair, my VAX HARDWARE HANDBOOK (1982-1983), on page 293, discusses the Failed UNIBUS Address Registers (FUBAR): (I quote) The FUBAR contains the upper 16 bits of the UNIBUS address translated from an SBI address during a previous software-initiated data transfer. The occurrence of either of two errors indicated in the status register will lock the FUBAR: UNIBUS Select Time Out (UBSTO) and UNIBUS Slave Sync Time OUT (UBSSYNTO). When the error bit is cleared the register will be unlocked. Obviously, the original purveyors of "foo bar" (i.e. the original BSD UNIX crew) saw the reference in the VAX manual; saw that the DEC VAX designers had had a "field-day" when they designed the hardware [and laughed even harder when the DEC censors blindly accepted the register "designation"], and "ran" with the joke. -- Dave Holcomb, Mentor Graphics, Silicon Design Division (formerly SCS/CAECO) 5295 South 300 West Suite 300 Murray, UT 84107-4763 USA (801)265-8007 caeco!dave@cs.utah.edu ----------------------------- From: Peter Scott <pjs@aristotle.jpl.nasa.gov> Subject: rogue df processes snarfing cpu Date: 14 Aug 90 18:08:58 GMT Sender: Usenet <news@elroy.jpl.nasa.gov> Followup-To: comp.unix.questions Nntp-Posting-Host: aristotle.jpl.nasa.gov To: info-unix@sem.brl.mil One of our machines has been down with a disk problem for a few days, and therefore the partitions that were NFS-mounted on that machine are unavailable to the other machines using the same NFS filesystem. I have typed "df" a few times to look at the filesystem usage and while it gives me the prompt back at the end of the output, it later responds that the other machines's NFS server is dead, and keeps trying. We now have several "df" processes running and raising the load average quite obnoxiously, and I don't know how to get rid of them. Kill or kill -9 doesn't work. Suggestions? SunOS 4.0.3, Sun 3/160. -- This is news. This is your | Peter Scott, NASA/JPL/Caltech brain on news. Any questions? | (pjs@aristotle.jpl.nasa.gov) ----------------------------- From: jian@kuhub.cc.ukans.edu Subject: How to issue a C SHELL command within a C program Date: 14 Aug 90 18:31:33 GMT To: info-unix@sem.brl.mil How can I issue a statment that executes a C SHELL command within a C program? I would appreciate any helps. Jian Q. Li jian@kuhub.cc.ukans.edu ----------------------------- From: kahlers@ux1.cso.uiuc.edu Subject: Re: How to issue a C SHELL command with Date: 14 Aug 90 21:42:00 GMT Nf-ID: #R:<25279:26:ux1.cso.uiuc.edu:22000008:000:429 Nf-From: ux1.cso.uiuc.edu!kahlers Aug 14 16:42:00 1990 To: info-unix@sem.brl.mil > How can I issue a statment that executes a C SHELL command within a C program? > I would appreciate any helps. You can use the "system" call. Use "man system" for more info. =============================================================================\n\ Kem Ahlers kahlers.ux1.cso.uiuc.edu (Internet) \n\ Caterpillar, Inc. u36009@ncsagate (Bitnet) \n\ Peoria, IL USA " ----------------------------- From: BURNS <gt0178a@prism.gatech.edu> Subject: Re: How to issue a C SHELL command with Date: 15 Aug 90 07:04:54 GMT To: info-unix@sem.brl.mil in article <22000008@ux1.cso.uiuc.edu>, kahlers@ux1.cso.uiuc.edu says: Nf-ID: #R:<25279:26:ux1.cso.uiuc.edu:22000008:000:429 Nf-From: ux1.cso.uiuc.edu!kahlers Aug 14 16:42:00 1990 >> How can I issue a statment that executes a C SHELL command within a C program? >> I would appreciate any helps. > > You can use the "system" call. Use "man system" for more info. The system call uses bourne sh, so this won't work unless the command you pass to system is 'csh mycommand', which would be inefficient (sh calls csh calls mycommand). Probably a skeleton like the following is needed: #include <stdio.h> #include <sys/wait.h> char mycommand[] = "history"; main() { union wait status; int pid,some_status=1,some_other_status=2; /* char mycommand[10] = "history";*/ fflush(0); /* optional - check syntax on your system */ switch (fork()) { case -1: perror(); exit(some_status); /* fork failed */ break; case 0: /* child proc */ execlp("/bin/csh","csh","-c",mycommand,(char *) 0); /* the -c is used when mycommand is a builtin */ exit(some_other_status); /* exec failed */ break; default: /* parent */ pid=wait(status); break; } } -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: rohan kelley <rk@bigbroth.uucp> Subject: need help with FATAL error in unix 3.2u Keywords: parity error, NMI, floppy access, gateway2000 Date: 14 Aug 90 18:54:47 GMT To: info-unix@sem.brl.mil Problems with unix 3.2u BellTech (Interactive) installation in Gateway2000-25 cache system. Error message: FATAL:Parity error on the motherboard PANIC:Parity error address unknown Trying to dump 1024 pages (etc) The kernal debugger automatically loads. The message is different each time the sytem crashes. The following is an example of one message: NMI debugger entered from df_dstack +300048f7 EAX EBX ECK EDX ESI EDI EBP ESP 00000060 0000033a 00000130 000084ff 00000000 0000e83d 0000e7f6 e0000e68 CS SS DS ES FS GS EPI EFL 000002bc 000202bc e0000000 00000000 00000000 00000000 000048f7 00020246 (Unfortunately, I don't know enough to use the debugger to go in and examine the kmem file to see what actually happened.) During other crashes, the debugger typically enters from a much lower stack number, for example, 00000006, although the number is not consistent from crash to crash. HELP: I'm stumped and the tech at Gateway2000 is stumped, although they claim to have unix running on 3 of their boxes in house, presumably running their network. I'm trying to send 2 kids off to college with these systems up and running. If I can't solve this problem pretty fast I'll have to regurn the systems to Gateway (and pay the freight) and my 30 day return window is fast closing. Any help would be sincerely appreciated. Please Email or call collect if you have any solutions. Comment: The system software is version 3.2u BellTech (now intel) which is a vanilla interactive port. The "u" upgrade among other things repaired the ESDI driver so it now works consistently. This same software is running happily on my intel 302 25mh cached Phoenix bios machine with a large ESDI drive and on a noname motherboard with an AMI bios, cached, and an MFM small drive. Locus merge 386 is also installed on all machines. Inducing condition: Crash occurs when accessing the floppy drive (either 0 or 1) but only at intermittent times. Commands current have been cpio and format. If the command begins to function normally, it will terminate normally. For example, using the "installpkg" command on the C development set of 4 disks, ran normally, but immediately after, trying to format a high density floppy failed. Hardware configuration: Micronics motherboard with intel 80306DX-25 and 80385 cache controller 64K cache on motherboard 4Mb memory in 4 1-MB simms on motherboard Phoenix Bios Microscience 5100 110 Mb ESDI drive with Ultra 12(F) cached controller. (for 2 floppy and 1 hard disk) ATI SVGA video board with CrystalScan monitor absent 80387 no network or LAN installed. Currently running as stand-alone. System configuration: Disk formatted, partition 1 27 Mb dos, partition 2 (balance) unix. (dos partition empty - no system or files loaded) Disk controller jumpered to set Bios address at C800:0 System board switch set NOT to relocate video bios into ram System board switch set NOT to relocate system bios into ram (Unsuccessful) attempts to correct problem: 1. Disable, alternatively, and then collectively, the disk controller cache and the motherboard cache. 2. Load up an identically configured system (I ordered 2) to determine if there is a hardware malfunction. No change in the problem. 3. Jumper the motherboard to reset the floppy I/O port to its secondary address (370-377) from primary at (3f0-3f7). Bios advised of incorrect setup on boot. I note in my intel 302 manual, at secton 3.7.9, it reads: "3.7.9 UNIX MODE Difference between a UNIX operating system and a non-UNIX operating sytem require a corresponding change in extended mmemory mapping. Non-UNIX operating systems such as DOS or OS/2, require the BIOS to be mapped to the upper part of the 16M address spaece. Even if the sytem memory exceeds 16M, the memory addresses from 15.5M to 16M will be reserved for the BIOS. A UNIX operating sytem has no such requirement and so all extended memory is available. As shown on Table 3-13, jumper pins E37 through E39 determine which operating system is enabled." Any help or suggestions would be sincerely appreciated Thanx much ======================================================================= Rohan Kelley -- UNIleX Systems, Inc. (Systems and software for lawyers) UUCP: ...{gatech!uflorida,ucf-cs}!novavax!bigbroth!rk (office) novavax!mdlbrotr!rk (home) ATTmail: attmail!bigbroth!rk 3365 Galt Ocean Drive, Ft. Lauderdale, FL 33308 Phone: (305) 563-1504 "Go first class or your heirs will" -somebodyelse ======================================================================= ----------------------------- From: Brian Glendenning <bglenden@mandrill.cv.nrao.edu> Subject: CVS Questions Date: 14 Aug 90 19:56:46 GMT Sender: news@murdoch.acc.virginia.edu To: info-unix@sem.brl.mil I have a question and a request about CVS: 1) Could someone send me or point me to an archive source for the postscript file of the USENIX article on CVS (man pages would be great too!). (We can't do troff here). 2) What are the major ways (if any) in which CVS has been extended from the system described in that article. 3) What are user experiences of this package (especially if you can compare it to NSE from sun). We have a ~500k line, multi-architecture package of mostly Fortran with some low level C. Any comments about the appropriateness of CVS would be appreciated (currently we have a homebrew system that runs under VMS). Thanks. If possible, please email and I will summarize if there is any interest. -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286 ----------------------------- From: P Sember SNR <psember@shiva.trl.oz> Subject: BSD references Keywords: Unix BSD references Date: 14 Aug 90 20:48:02 GMT Sender: root@trlluna.trl.oz To: info-unix@sem.brl.mil Recently I have been trying to create a bibliography on BSD. However, most references are to System V. I would appreciate some references (Introductory, Intermediate and Advanced) and remarks on books about BSD. Thanks in Advance! -------------- Peter Sember Telecom Research Labs P.O. Box 249 Clayton, Victoria 3168 Australia Tel. +61-(0)3-5416127 Internet: p.sember@trl.oz.au ----------------------------- From: Brian Glendenning <bglenden@mandrill.cv.nrao.edu> Subject: directory reading Date: 15 Aug 90 00:21:50 GMT Sender: news@murdoch.acc.virginia.edu To: info-unix@sem.brl.mil I'm converting some old directory reading code to get it to work on the latest version of Convex OS (8.1). The old code contained: struct direct *dp; [...] if (dp->d_ino == 0) continue; Presumably because the reading routines could return non-null pointers that contained invalid (deleted or whatever) directory entries. It looks like modern readdir(3)'s only return pointers to valid entries, and NULL at the end, so a test of this type is no longer required. True? Thanks! Brian -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286 ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: VMS compress utility Date: 15 Aug 90 01:02:32 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil Is there a VAX/VMS compression/decompression utility that is compatible with the standard Unix compress utility? Information appreciated. /ivo welch ivo@next.agsm.ucla.edu [128/97/74/50] ----------------------------- From: Bill Masek <bill@frog.uucp> Subject: ELF object formats for i386 (V.4) Keywords: debugger Date: 15 Aug 90 01:19:00 GMT To: info-unix@sem.brl.mil We are using a third party debugger and we want to debug ELF files. I am looking for some documentation about understanding the symbol table and line numbers. I have looked in the programmer's reference manual, programmer's user guide, general ABI interface and several processor specific abi supplements with no success. Where is it described in enough detail to use? Thank you for your help -- bill masek charles river data associates (617) 491-5320 (h) (508) 626-1122 (w) ----------------------------- From: "John R. Schutz" <john@csrnxt1.ae.utexas.edu> Subject: A non-shell outable editor Keywords: editor, no-shell, security Date: 15 Aug 90 02:02:30 GMT Sender: news@ut-emx.uucp Posted: Tue Aug 14 21:02:30 1990 To: info-unix@sem.brl.mil Hello once again! I thank the many people who sent replies to my earlier question about limiting access to a certain user to only run our nn newsreader. Anyways, here is a summary of responses: One person said (this is basically what it meant): forget it, if you want to restrict access, restrict COMPLETE access, i.e. don't let them on. Many, many people said that I should edit the .login or .profile file to automatically go into nn. The problem with this is that nn has a shell escape, but I am hacking that bit out for this user Also, the editor I use has a shell escape, but I don't have the source for this. One person said that I should write a C program to do something similiar to the above. But it also has the same holes. One person said use rsh, or the "restricted shell". This seemed like the best solution at the time, but I checked and the only rsh I have stands for "remote shell". I am currently looking into this. Pointers to source would be appreciated. So this leaves me at the point of finding an editor that has no shell-escaping capabilities. Any ideas on this one? <Waits for another mailbox flood.> Anyways, thanks everyone for the replies. If anyone needs the examples that these many kind people sent, send mail, and I will send back all the replies I received. Thank you. john -- | John R. Schutz | Internet&NeXTmail: john@csrnxt1.ae.utexas.edu | | Center for Space Research | Standard Disclaimer | "I'm mentally | | Programmer (NeXT) | unstable, cracked, and clinically insane. | | Etc. | Besides that, I'm perfectly normal." -me | ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/19/90)
----Reason for mail failure follows---- Sending mail to <math!ckaul@cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 15 Aug 90 06:39:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#117 To: "math!ckaul" <math!ckaul@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Wed, 15 Aug 90 06:08:38 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ad10635; 15 Aug 90 5:56 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa10626; 15 Aug 90 5:46 EDT Date: Wed, 15 Aug 90 05:45:41 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#117 Message-ID: <9008150546.aa10626@SEM.BRL.MIL> INFO-UNIX Digest Wed, 15 Aug 1990 V10#117 Today's Topics: Re: How to tell if a process exists Re: System VR4/i386 - when ? Re: "make" file question Re: OK, so who runs SVR4 ?? Re: AWK Language Question Re: reliable reads from pipes Cross-compatibility of QIC tarfiles Re: <None> awk errors System-dependent manifest constants (i.e., 'i386', 'mips', 'vax') Re: -F option for awk Restricting a user Re: What's wrong with this Bourne shell script? Having a conference instead of 'talk'? Re: link (ln) with *one* name? readdir and such My post didn't work? Re: My post didn't work? Way over my head! Recursion without -R Re: Recursion without -R Re: make SUFFIXES question..... Korn-shell info needed Re: uucico hanging. LBOLT??? SCO Mailing List non-interactine telnet session make(1) question Re: Checkpoints for large jobs Re: help sought - securing a terminal/line RE: 'foo bar' <- What's the meaning of? rogue df processes snarfing cpu How to issue a C SHELL command within a C program Re: How to issue a C SHELL command with need help with FATAL error in unix 3.2u CVS Questions BSD references directory reading VMS compress utility ELF object formats for i386 (V.4) A non-shell outable editor ----------------------------------------------------------------- From: Bob Fisher <nts0302@dsacg3.dsac.dla.mil> Subject: Re: How to tell if a process exists Date: 13 Aug 90 11:51:34 GMT To: info-unix@sem.brl.mil From article <13534@smoke.BRL.MIL>, by gwyn@smoke.BRL.MIL (Doug Gwyn): } In article <7733@amelia.nas.nasa.gov> samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: } -In article <1823@necisa.ho.necisa.oz> boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: } ->Wrong. RTFM -- kill(pid, 0) } - Hmmm -- must be running Reverse Polish Unix down under, 'cause my } -manual sez: " kill [-sig] processid... ", and I've been doing it that way } -for a looooooooong time. } } Doing what, incorrectly reading your manual? They're both right. They're just reading different sections of the manual. -- Bob Fisher US Defense Logistics Agency Systems Automation Center DSAC-TSX, Box 1605, Columbus, OH 43216-5002 614-238-9071 (AV 850-9071) bfisher@dsac.dla.mil osu-cis!dsacg1!bfisher ----------------------------- From: Rchard Ducoty <rduc@uport.uucp> Subject: Re: System VR4/i386 - when ? Keywords: V4 Date: 13 Aug 90 15:22:32 GMT To: info-unix@sem.brl.mil In article <1990Aug11.123519.21964@kth.se> perand@admin.kth.se (Per Andersson) writes: > >WHEN WILL I BE ABLE TO BUY SYSTEM V rel 4 FOR THE i386 ? ============= Now ! Yesterday ! Call Microport @ 1-408-438-8649 Richard ----------------------------- From: "D'Arcy J.M. Cain" <darcy@druid.uucp> Subject: Re: "make" file question Date: 13 Aug 90 15:23:59 GMT To: info-unix@sem.brl.mil In article <8427@ccncsu.ColoState.EDU> flatau@handel.UUCP (flatau) writes: >I have the following "makefile" file > >PAT=/ub/path/ >FILES=a.f b.f >NEW=$(PAT)$(FILES) >all: > echo $(NEW) > >=========================== >The output from this "make" is > /ub/path/a.f b.f > >but I would like to have >/ub/path/a.f /ub/path/b.f > >Well, the question is: How to append prefix (/ub/path/) to >a list of files using "make". > I use GNU make and I do this with the following: NEW=$(foreach i, $(FILES), $(PAT)$i) -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | MS-DOS: The Andrew Dice Clay West Hill, Ontario, Canada | of operating systems. + 416 281 6094 | ----------------------------- From: Rchard Ducoty <rduc@uport.uucp> Subject: Re: OK, so who runs SVR4 ?? Keywords: V4 Date: 13 Aug 90 15:41:02 GMT To: info-unix@sem.brl.mil In article <1990Aug6.121634.176@aim1.uucp> deon@aim1.uucp (Deon Botha) writes: >From article <736@pcsbst.pcs.com>, by mike@cochise.pcs.com (Mike Schroeder): >> >> the subject line really says all: what system vendors/software vendors >> are supplying SVR4 for _real live_ systems today? >> If any: who for what system? ============== Microport is also shipping V4 for 386/486 machines (ISA) Richard Ducoty Microport Scotts Valley, CA 408 438-8649 ----------------------------- From: Norman Joseph <norm@oglvee.uucp> Subject: Re: AWK Language Question Date: 13 Aug 90 16:39:31 GMT To: info-unix@sem.brl.mil In <972@richsun.cpg.trs.reuter.com>, boi@richsun.cpg.trs.reuter.com (Ken Boi) writes: >According to the book "The AWK Programming Language", there >are built-in string functions. One of them is 'gsub'. I have >tried using it with the following comand line statement which >is very close to the example in the book: > [...] >I get the error messages: > awk: syntax error near line 1 > awk: illegal statement near line 1 >Anybody know why? The awk you are running on your system (you don't tell us what you have) is an earlier version of the one described in _The_AWK_Programming_Language_, which is a (relatively) recent update. If your system is like some, you may have the new version of awk listed under the name "nawk" (new awk). -- Norm Joseph cgh!amanue!oglvee!norm@dsi.com Oglevee Computer Systems, Inc. {pitt,cgh}!amanue!oglvee!norm "Shucking Usenet oysters in pursuit of a pearl." -- Bill Kennedy ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: AWK Language Question Date: 14 Aug 90 18:13:30 GMT To: info-unix@sem.brl.mil >Otherwise, you can obtain the new flavor of awk from the AT&T UNIX >System ToolChest, or from UNIX System V Release 3.2 or later, It first appeared in S5R3.1. ----------------------------- From: "stephen.a.rago" <sar0@cbnewsl.att.com> Subject: Re: reliable reads from pipes Date: 13 Aug 90 17:12:23 GMT To: info-unix@sem.brl.mil In article <1827@necisa.ho.necisa.oz>, boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: > In article <11155@alice.UUCP> andrew@alice.UUCP (Andrew Hume) writes: > > > > lest anyone start relying on reads returning whatever is in the pipe, > >9th edition and later unices preserved the size of the writes which can > >now also exceed the size of the pipe buffer (i think). > > Not to mention the 1 byte write nasty that will take out all your > stream message buffers. The stream pipe fills when the write > side high water mark is hit; which is tunable. SVR4 won't let someone "take all the stream message buffers" unless they are running as root. And it's not message buffers, its general memory out of the kernel memory pool. > > Those M_DELIM's are neat... > M_DELIM's are old. In V10 it's a flag in the message header (except for the message line discipline). SVR4 also has delimiters, if you want to use them. Steve Rago sar@attunix.att.com ----------------------------- From: "Gary M. Lin" <skidrow@ceres.ucsc.edu> Subject: Cross-compatibility of QIC tarfiles Keywords: QIC tar compatibility Date: 13 Aug 90 17:34:38 GMT Sender: usenet@darkstar.ucsc.edu To: info-unix@sem.brl.mil I'm interested in moving up to QIC backups, instead of the standard 9-track reels I have. I have access to QIC units on an IBM RS/6000 and a Sun workstation. My question is can I read-in tarfiles written on another UNIX system, if they are both set on the same length, density and formatting specs? The RS/6000 supports DC-300XLP, and I believe the Sun also. I would like comments from anyone who does this regularly. Thanks in advance, - Gary M. Lin skidrow@ceres.ucsc.edu ----------------------------- From: "Roger B.A. Klorese" <rogerk@mips.com> Subject: Re: <None> Keywords: Fortran Date: 13 Aug 90 20:17:10 GMT Sender: news@mips.com To: info-unix@sem.brl.mil In article <1990Aug5.192922.20989@ux1.cso.uiuc.edu> mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: >The $ is not a standard F77 feature. Yet it IS documented to do what >I want in the Mips Fortran manual. It doesn't work: I have to type >two carriage returns to get input, which comes in wrong. > >How does one do this in Mips Fortran, or in general on common Unix Fortrans. This is a bug in Mips Fortran releases 1.31 and 2.0. Upgrade to release 2.10 (if you are running pre-4.50 RISC/os) or 2.11 (for 4.50). -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 MS 4-02 950 DeGuigne Dr. Sunnyvale, CA 94086 voicemail: +1 408 524-7421 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I'm the NLA" "If the world were a logical place, men would ride sidesaddle." -Rita Mae Brown ----------------------------- From: "William (Bill" <mayne@vsserv.scri.fsu.edu> MMDF-Warning: Parse error in original version of preceding line at BRL.MIL Subject: awk errors Keywords: QIC tar compatibility Date: 13 Aug 90 20:34:00 GMT Sender: news@sun13.scri.fsu.edu To: info-unix@sem.brl.mil In my earlier post on this question all but the last paragraph got lost somehow. The part which showed up on the net wouldn't make much sense, so I'll summarize again. My apologies for the confusion. Using awk on a Sun 3 run SunOS 4.0 I sometimes get either bus errors or segmentation faults in the awk interpreter. Although I sometimes find errors in the awk program which I was trying to interpret (no thanks to the graceful error handling) I regard this as a bug. An interpreter or compiler shouldn't fail like that no matter what the input is. But I know I have to learn to live with it the way it is. If anyone out there has learned some techniques to help locate the error in a case like this, or has discovered what patterns of source code errors cause this interpreter [mis]behavior please enlighten me. Email responses preferred. I will summarize if others show interest. ----------------------------- From: Warren Tucker <wht@n4hgf.mt-park.ga.us> Subject: System-dependent manifest constants (i.e., 'i386', 'mips', 'vax') Keywords: i386 M_SYS5 sequent m68k vax etc.... Date: 13 Aug 90 21:27:59 GMT Followup-To: poster To: info-unix@sem.brl.mil I would like to compile a list of pre-defined manifest constants supplied by various C compilers. I have: M_I186 M_I286 M_I386 M_I8086 M_I86 M_INTERNAT M_SYS5 M_UNIX M_XENIX i386 i486 m68k mips pdp11 pyr sequent sun sun2 sun3 sun4 vax If your compiler supplies predefined constants separately for the OS, compiler or hardware type, please differentiate among them. Please e-mail and I will summarize if there is any interest. Thanks. ----------------------------------------------------------------------- Warren Tucker, TuckerWare gatech!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US "Tell the moon; don't tell the March Hare: He is here. Do look around." ----------------------------- From: Roger Rohrbach <roger@yuba.wrs.com> Subject: Re: -F option for awk Keywords: awk field-separator Date: 13 Aug 90 21:41:03 GMT Sender: news@wrs.wrs.com To: info-unix@sem.brl.mil rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >When awk'ing something like a passwd file, where the reasonable choice >of field separator is something other than whitespace, how do you >let a line simply fall through and be printed unchanged? >print; or print $0; don't do the right thing because the lines come >out with spaces as the field separators instead of the character given >to the -F option. I don't know what version of awk you are using; both the old and GNU versions of awk print the input line unchanged unless you explicitly reset the OFS (output field separator) variable. I.e, awk -F: '{ print }' /etc/passwd prints /etc/passwd unchanged. As a matter of fact, if you want the behavior you claim to be experiencing, you not only have to set OFS, but you have to mess with one of the fields in order to get awk to recompute $0, i.e., awk -F: ' BEGIN { OFS = " " } { $1 = $1 # recompute $0 print }' /etc/passwd produces the behavior you describe. Perhaps "new awk" behaves differently; in that case, try setting OFS to FS and use this trick. Roger Rohrbach sun!wrs!roger roger@wrs.com - Eddie sez: ----------------------------------------------- (c) 1986, 1990 -. | {o >o | | \ -) I'm lurching between the aesthetic sublime and the quotidian grime. | ----------------------------- From: George Turczynski <george@hls0.hls.oz> Subject: Re: -F option for awk Keywords: awk field-separator Date: 14 Aug 90 00:03:36 GMT To: info-unix@sem.brl.mil In article <491@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: > When awk'ing something like a passwd file, where the reasonable choice > of field separator is something other than whitespace, how do you > let a line simply fall through and be printed unchanged? > I must have misunderstood your question. This works fine: tmp: awk -F: '{ if( $1 == "nobody" ) print }' /etc/passwd nobody:*:-2:-2::/: This is under SunOS 4.0.3, and works for both sh & csh. I don't know what you're running, but it might have been useful to know >:-} -- | George P. J. Turczynski. |---------------------------------------------------- | Computer Systems Engineer. | ACSnet: george@highland.oz | I can't speak for the | | Highland Logic Pty. Ltd. | Phone: +61 48 683490 | company, I can barely | | Suite 1, 348-354 Argyle St | Fax: +61 48 683474 | speak for myself... | | Moss Vale. NSW. Australia. 2577 |---------------------------------------------------- ----------------------------- From: "John R. Schutz" <john@csrnxt1.ae.utexas.edu> Subject: Restricting a user Keywords: Restrict, No access Date: 13 Aug 90 22:34:06 GMT Sender: news@ut-emx.uucp To: info-unix@sem.brl.mil Howdy y'all. I have what (should be) a quick question. I want to restrict a certain users access to just reading news. No more than that. I use the nn news reader. I have tried defining his login shell to the nn binary, but the problem comes with terminal emulations. I need to be able to setenv TERM vt100 (or the equivalent) before he can use nn...then when he quits nn, it should log him off...any suggestions? john -- | John R. Schutz | Internet&NeXTmail: john@csrnxt1.ae.utexas.edu | | Center for Space Research | Standard Disclaimer | "I'm mentally | | Programmer (NeXT) | unstable, cracked, and clinically insane. | | Etc. | Besides that, I'm perfectly normal." -me | ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 13 Aug 90 23:11:08 GMT Sender: fpb@ittc.wec.com To: info-unix@sem.brl.mil In article <1474@chinacat.Unicom.COM> chip@chinacat.Unicom.COM (Chip Rosenthal) writes: >If you snarfed the "stat" program I posted to alt.sources recently, >I'd suggest: > echo 0`stat -s * | sed -e 's/.*:/+/'` | bc >or if you have Jon's addcol, even simpler: > stat -s * | addcol -2 Where is Jon's addcol. I tried to write one a while back and kept screwing it up. I would like to see a working version. -- Frank P. Bresz }*{ ITTC Network Administrator +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: What's wrong with this Bourne shell script? Date: 14 Aug 90 17:10:56 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | >or if you have Jon's addcol, even simpler: | | > stat -s * | addcol -2 | | Where is Jon's addcol. I tried to write one a while back and kept | screwing it up. I would like to see a working version. for addcol -1, try: perl -ane '$s += $F[0]; print "$s\n" if eof;' for addcol -2: perl -ane '$s += $F[1]; print "$s\n" if eof;' Others may be derived by noticing the pattern. :-) Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Hla Tun "Tim" Thein <thein@boole.seas.ucla.edu> Subject: Having a conference instead of 'talk'? Keywords: talk Date: 14 Aug 90 00:18:25 GMT Sender: news@seas.ucla.edu To: info-unix@sem.brl.mil I would like to be able to talk to one or more people at the same time on the computer at the same time. Could anyone please tell me where I could find a program similar to 'talk' where two or more people could have a conference through computers on the internet? Please reply to the address below since I do not frequently read this newsgroup. Hla Tun "Tim" Thein ......__ __ _____ _____ (thein@boole.seas.ucla.edu) ////// /_/ //_ _//_ _/ Computer Science & Engineering ///// __ / / / / / University of California, Los Angeles ////_/ /_/o /_/o /_/o -- Hla Tun "Tim" Thein ......__ __ _____ _____ (thein@boole.seas.ucla.edu) ////// /_/ //_ _//_ _/ Computer Science & Engineering ///// __ / / / / / University of California, Los Angeles ////_/ /_/o /_/o /_/o ----------------------------- From: "Roger B.A. Klorese" <rogerk@mips.com> Subject: Re: link (ln) with *one* name? Date: 14 Aug 90 01:30:10 GMT Sender: news@mips.com To: info-unix@sem.brl.mil In article <5698@uwm.edu> jgd@csd4.csd.uwm.edu (John G Dobnick) writes: >Stupid question time (I haven't asked one of these for a while, so >I'm due. :-) ] > > >Re: 4.3 "ln". The manpage says ln(1) can be called with only one name. > What purpose does this serve? Given that ln(1) is > supposed to create "links", I would think you need a > minimum of *two* filenames, no? What am I missing > here? ln -s /some/other/dir/foo creates a link called "foo" in the current directory. -- ROGER B.A. KLORESE MIPS Computer Systems, Inc. phone: +1 408 720-2939 MS 4-02 950 DeGuigne Dr. Sunnyvale, CA 94086 voicemail: +1 408 524-7421 rogerk@mips.COM {ames,decwrl,pyramid}!mips!rogerk "I'm the NLA" "If the world were a logical place, men would ride sidesaddle." -Rita Mae Brown ----------------------------- From: Sameer Parekh <zane@ddsw1.mcs.com> Subject: readdir and such Date: 14 Aug 90 03:43:30 GMT To: info-unix@sem.brl.mil -- ************************************************************************** * * * Sameer Parekh * * C Programmer in Training * ----------------------------- From: Sameer Parekh <zane@ddsw1.mcs.com> Subject: My post didn't work? Date: 14 Aug 90 03:46:54 GMT To: info-unix@sem.brl.mil That last post was dissolved by my .signature, (Can I delete a just posted and saved post with rn?) How do I use readdir and the functions to read the directories of a unix in C? -- ************************************************************************** * * * Sameer Parekh * * C Programmer in Training * ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: My post didn't work? Date: 14 Aug 90 17:01:29 GMT To: info-unix@sem.brl.mil In article <1990Aug14.034654.12584@ddsw1.MCS.COM> zane@ddsw1.MCS.COM (Sameer Parekh) writes: >How do I use readdir and the functions to read the directories of a unix in C? That's like asking "How do I program in C?" For what it's worth, here's the test program that I include with my public-domain distribution of POSIX directory access routines; maybe it will answer whatever your real question is. /* testdir -- basic test for C library directory access routines last edit: 25-Apr-1987 D A Gwyn */ #include <sys/types.h> #include <stdio.h> #include <dirent.h> extern void exit(); extern int strcmp(); main( argc, argv ) int argc; register char **argv; { register DIR *dirp; register struct dirent *dp; int nerrs = 0; /* total not found */ if ( (dirp = opendir( "." )) == NULL ) { (void)fprintf( stderr, "Cannot open \".\" directory\n" ); exit( 1 ); } while ( --argc > 0 ) { ++argv; while ( (dp = readdir( dirp )) != NULL ) if ( strcmp( dp->d_name, *argv ) == 0 ) { (void)printf( "\"%s\" found.\n", *argv ); break; } if ( dp == NULL ) { (void)printf( "\"%s\" not found.\n", *argv ); ++nerrs; } rewinddir( dirp ); } (void)closedir( dirp ); exit( nerrs ); } ----------------------------- From: "J. Michael Diehl" <mdiehl@hydra.unm.edu> Subject: Way over my head! Date: 14 Aug 90 08:32:06 GMT Sender: USENET News System <usenet@ariel.unm.edu> To: info-unix@sem.brl.mil Like the subject says, I think I may be out of my league as a beginning C programmer, but here it goes! I am trying to write a program that will start an ftp process in the background, write commands to the ftp's stdin and read the results from the ftp's stdout. Circular pipes? I'm hoping to do it entirely in C so as to avoid any shell programming. I'd like to have only *one* file that does it all. Now for my questions: Will a process terminate if it gets an EOF in it's stdin? Or do I have to make sure that my background ftp process always has something to read in? I am trying to fork a process. (one to do the controlling, one to do the ftp) I feel sure that the fork is working, but when I try to start ftp...well... it never starts. I'm lost. What follows is the code segment in question, followed by the out put it generates. #include <stdio.h> #include <ctype.h> #define LINE_LEN 180 #define FTP_OUT "Auto_ftp_out" #define FTP_IN "Auto_ftp_in" char cmd[LINE_LEN]; /* current command */ start_ftp() { int tmp; sprintf(cmd,"ftp < %s > %s", FTP_IN, FTP_OUT); puts(cmd); if ((tmp = fork()) == -1) { puts("Fork could not start ftp.\n"); exit(-1); } printf("%d\n",tmp); if (tmp != 0) { /* child process */ puts("Starting ftp.\n"); if (-1 == execve(cmd,cmd,"\0")) { /* magic number from manual */ puts("Execve could not start ftp.\n"); exit(-1); } } } .......and now for the output.... ftp < Auto_ftp_in > Auto_ftp_out 25024 0 Starting ftp. Execve could not start ftp. As you can see, I do get the fork to work.....but execve() returns an error. Any ideas? Note that I'm a new C programmer, and that if you've read this far, I'd like to hear any constructive comments you might have. Helping my with this problem would be nice, too! ;^] Thanx in advance. +-------------------------+----------------------------------------------------+ | J. Michael Diehl ;-] | I thought I was wrong once. But, I was mistaken. | | +----------------------------------------------------+ | mdiehl@hydra.unm.edu | "I think marriage should be a lifelong commitment."| | Thunder@forum | the man said to his new wife as he placed a pistol| | Thunder@Tiny* | on the mantle. | | (505) 272-HaHa | | +-------------------------+----------------------------------------------------+ ----------------------------- From: Robert Shaw <rjshaw@ramius.ocf.llnl.gov> Subject: Recursion without -R Keywords: recursion Date: 14 Aug 90 10:02:41 GMT Sender: usenet@llnl.llnl.gov To: info-unix@sem.brl.mil Hi. What are some quick tricks for getting programs like chmod and chown to descend into all subdirectories? Programs without a -R option, that is. ==== My earlier "awk -F" was refering to a Pyramid running OSx. Thanx to those who called OFS to my attention, and my apologies to those of who noted that awk -F on a sun works differently that I claimed in posting. ==== I'm also looking for Korn shell info... =============================================================================== rjshaw@ramius.llnl.gov _____ ____ ____ ______ R o b / / / / / / / / / / / -------- / --/ / / / / / / / / / --------------------------- /-- / / / / / / / / S h a w /____/ /_/_/ /_/_/ /_____/ The Cosby's are precisely what's wrong with television today... =============================================================================== ----------------------------- From: Shu-Wie F Chen <swfc@ulysses.att.com> Subject: Re: Recursion without -R Keywords: recursion Date: 14 Aug 90 20:31:40 GMT Sender: netnews@ulysses.att.com To: info-unix@sem.brl.mil In article <494@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: |>Hi. |> |>What are some quick tricks for getting programs like chmod and chown to |>descend into all subdirectories? Programs without a -R option, that is. |> find . -print | xargs chown foo Of course, this only works if you have xargs, which is from System V and is also available on SunOS in their System V software installation option. *swfc ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: Recursion without -R Keywords: recursion Date: 14 Aug 90 20:33:55 GMT Sender: news@convex.com Followup-To: comp.unix.questions To: info-unix@sem.brl.mil In article <494@llnl.LLNL.GOV> rjshaw@ramius.llnl.gov writes: >What are some quick tricks for getting programs like chmod and chown to >descend into all subdirectories? Programs without a -R option, that is. Well, here's a quick way to change all files from a set of old uids and gids to new ones. In this example, I want to change group uucp to be 1789, group staff to be 666, user kirk to be 1000, and user bill to be 7777. This code traverses the file system making those changes, omitting NFS decents. This is just a fragment of a larger program that does a lot of other sanity checks and configuration stuff not included here. #!/usr/bin/perl $start = '/'; # do whole tree %nuid = ( 'kirk', 1000, 'bill', 7777 ); %ngid = ( 'staff', 666, 'uucp', 1789 ); open(FIND, "find $start \\( -fstype nfs -prune \\) -o -ls |"); while (<FIND>) { split; $uid = $gid = -1; ($file, $user, $group) = ($_[11], $_[5], $_[6]); if (defined $nuid{$user}) { $uid = $nuid{$user}; } if (defined $ngid{$group}) { $gid = $ngid{$group}; } if (($uid != -1 || $gid != -1) && !chown($uid, $gid, $file)) { warn "$0: couldn't change $file to $uid.$gid: $!\n"; } } --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in <sys/errno.h>: Editor too big!" ----------------------------- From: andre <andre@targon.uucp> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 10:57:04 GMT To: info-unix@sem.brl.mil In article <8212@ncar.ucar.edu> morreale@bierstadt.scd.ucar.edu (Peter Morreale) writes: >Consider the following makefile: > >.pp.o: > cp $*.pp $*.f > >.SUFFIXES: $(SUFFIXES) .pp >FILES= f1.o > >compile: $(FILES) > @echo "Why isn't .f.o applied?" > >clean: > -rm -f $(FILES) *.f >You'll notice that the ".pp.o" rule is executed, and then the >compile rule. The question is: Why isn't the default ".f.o" rule >executed before the "compile" target? (If you type make again, the >".f.o" rule is executed and all is well....) This is because you told make how to make a .o file from a .pp file. after the commands involved are executed, make goes on because it just did what you told it to do to get an object out of an .pp file. But! you created an .f file and no .o file. this means that you should tell make that you make a .f file or make the .o file: .pp.o: cp $< $*.f $(FCOMP) -o $*.o $*.f ^-- whatever you need to go from .f to .o (fortran?) OR .pp.f: cp $< $*.f In the second case make should add up both the .pp.f and .f.o rules to make your .o out of .pp. -- The mail| AAA DDDD It's not the kill, but the thrill of the chase. demon...| AA AAvv vvDD DD Ketchup is a vegetable. hits!.@&| AAAAAAAvv vvDD DD {nixbur|nixtor}!adalen.via --more--| AAA AAAvvvDDDDDD Andre van Dalen, uunet!hp4nl!targon!andre ----------------------------- From: Christopher R Volpe <volpe@underdog.crd.ge.com> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 22:12:45 GMT Sender: news@crdgw1.crd.ge.com To: info-unix@sem.brl.mil In article <1446@targon.UUCP>, andre@targon.UUCP (andre) writes: |>In article <8212@ncar.ucar.edu> morreale@bierstadt.scd.ucar.edu (Peter Morreale) writes: |> >Consider the following makefile: |> > |> >.pp.o: |> > cp $*.pp $*.f |> > |> >.SUFFIXES: $(SUFFIXES) .pp |> >FILES= f1.o |> > |> >compile: $(FILES) |> > @echo "Why isn't .f.o applied?" |> > |> >clean: |> > -rm -f $(FILES) *.f |> |> >You'll notice that the ".pp.o" rule is executed, and then the |> >compile rule. The question is: Why isn't the default ".f.o" rule |> >executed before the "compile" target? (If you type make again, the |> >".f.o" rule is executed and all is well....) |> |>This is because you told make how to make a .o file from a .pp file. |>after the commands involved are executed, make goes on because it just |>did what you told it to do to get an object out of an .pp file. |>But! you created an .f file and no .o file. this means that you should |>tell make that you make a .f file or make the .o file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not good enough!!! |> |>.pp.o: |> cp $< $*.f |> $(FCOMP) -o $*.o $*.f |> ^-- whatever you need to go from .f to .o (fortran?) |>OR |> |>.pp.f: |> cp $< $*.f |> |>In the second case make should add up both the .pp.f and .f.o rules |>to make your .o out of .pp. No, it won't. At least not on a Sun. From the Make User's Guide: There is no transitive closure for suffix rules. If you had a suffix rule for building, say, a .Y file from a .X file, and another for building a .Z file from a .Y file, make would not combine the rules to build a .Z file from a .X file. You must specify the intermediate steps as targets, although their entries may have null rules: trans.Z: trans.Y: If all you have is a .pp.f rule and a .f.o rule, and you say "make f1.o", one of the following must be true: a) there exists a f1.f file, or b) f1.f is EXPLICITLY listed as a target *AND* file f1.pp exists Chris Volpe G.E. Corporate R&D volpecr@crd.ge.com ----------------------------- From: "Dik T. Winter" <dik@cwi.nl> Subject: Re: make SUFFIXES question..... Date: 14 Aug 90 23:20:08 GMT Sender: news@cwi.nl To: info-unix@sem.brl.mil In article <1446@targon.UUCP> andre@targon.UUCP (andre) writes: > $(FCOMP) -o $*.o $*.f > ^-- whatever you need to go from .f to .o (fortran?) Please, use $(FC) which is predefined on most systems, and evaluates to the fortran compiler (which can be named f77, fort, fc, fortran, ...). -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl ----------------------------- From: arcan01@cai.com Subject: Korn-shell info needed Date: 14 Aug 90 11:10:59 GMT To: info-unix@sem.brl.mil I am in need of information on how to use the Korn-shell. Any assistance would be appreciated. Thanks. arcan01@cai.com ----------------------------- From: Richard Tobin <richard@aiai.ed.ac.uk> Subject: Re: uucico hanging. LBOLT??? Keywords: Sun 2/170, SunOS 4.0 w/yapt 5.5 Date: 14 Aug 90 11:24:36 GMT To: info-unix@sem.brl.mil In article <25998@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: >`lbolt' is the `lightning bolt' interrupt (shazam! :-) ), which occurs >once per second (in V6 it may have been once every 4 seconds Yes: if((time[1]&03) == 0) { ... wakeup(&lbolt); } -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin ----------------------------- From: Dave Armbrust <dma@pcssc.uucp> Subject: SCO Mailing List Date: 14 Aug 90 12:48:30 GMT Followup-To: poster To: info-unix@sem.brl.mil The Santa Cruz Operation mailing list Charter: For exchange of information and discussions regarding all products from Santa Cruz operations. This group will be beneficial to any one interested or currently using SCO products. This mailing list is a single area that discussions and information can be exchanged regarding ALL SCO products. This mailing is independent of any existing news groups. If you are currently using SCO products, interested in products from SCO or work for Santa Cruz Operations I encourage you to join the SCO mailing list. The SCO mailing list is located on the uunet host. (Thanks uunet) Send all articles or discussions to the address: uunet!sco-list or sco-list@uunet.uu.net Please send change requests to uunet!sco-list-request or sco-list-request@uunet.uu.net. If you wish to be added to this list please follow these instructions. It is important that these instructions are followed as the process is automated. 1) Mail your add request to sco-list-request@uunet. Do not send your request to uunet!sco-list as this is the address to post all articles to. 2) Include the address you wish to received the mailing at in the body of the mail message. Example to add the address dma@pcssc.com include in the body of the message the following: Add: dma@pcssc.com Note the word add starts with a capital `A` and is the first word on the line. It is also followed by a colon ':', a single blank space, an address and then a new line. Be sure to include the `:` and the blank. Do not follow the address with any comments. Bang paths are also accepted, but needs to be the the path from uunet. (i.e. pcssc!dma instead of uunet!pcssc!dma) Example: Add: pcssc!dma Do not include both forms of address as you will then get two copies of every mailing. Just do one or the other (i.e. dma@pcssc.com or pcssc!dma) Do not put the add request in the subject line as this will be ignored. 3) Once our system receives your request you will receive an acknowledgment. You will then start to get all articles posted to uunet!sco-list. 4) If you do not receive the acknowledgment and postings right away do not send a alternate address path. You may end up getting two copies of all posting using both paths. Instead mail myself at dma@pcssc.com and ask if I got the original request. ----------------------------------------------------------------------------- Dave Armbrust | uunet!pcssc!dma PC Software Systems | dma@pcssc.com or 2121 Cornell Street | owner-sco-list@uunet.uu.net Sarasota, FL 34237 | Phone: (813)365-1162 ----------------------------- From: "Joseph T. Healey" <healey@xn.ll.mit.edu> Subject: non-interactine telnet session Keywords: non-interactive telnet session Date: 14 Aug 90 13:04:51 GMT To: info-unix@sem.brl.mil Is there any way to invoke a non-interactive telnet session via a script (preferably csh or sh) ? We would like the script to: log into the target machine run an arbitrary number of commands listed in the script log out of the target machine Thanks in advance. ----------------------------- From: Oliver Laumann <net@tub.uucp> Subject: make(1) question Date: 14 Aug 90 13:19:26 GMT To: info-unix@sem.brl.mil What is /bin/make supposed to do with the following Makefile (provided that foo.c exists)? % cat Makefile .DEFAULT: echo Ouch. all: foo.o foo.o: foo.c cc -c foo.c % Note that the rule for "all" doesn't have commands. Under all versions of UNIX where I have tested it (lots!), it only compiles foo.c. GNU make, on the other hand, compiles foo.c and then executes the command under the .DEFAULT rule. The 4.3BSD manual for make(1) says that if a target must be created and there are neither any explicit commands nor a relevant built-in rule, then the commands under the .DEFAULT are executed. So GNU make seems to be correct. Is this true? If so, how can I modify the above Makefile to suppress execution of the .DEFAULT commands (provided the .DEFAULT rule must be there for other reasons)? Add a "dummy" echo command to the "all" rule? Or an empty command, i.e. just a tab character? (We don't have GNU make here.) Thanks, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP ----------------------------- From: Mike Litzkow <mike@cream.cs.wisc.edu> Subject: Re: Checkpoints for large jobs Keywords: checkpoint interrupt signal Date: 14 Aug 90 15:47:18 GMT Sender: news@spool.cs.wisc.edu To: info-unix@sem.brl.mil Yes, checkpointing is one part of the Condor system, (previously called RU). Condor uses cycles on idle workstations by migrating processes to them. When the workstations subsequently come under use by their normal users, the condor jobs are checkpointed, and later moved to another idle workstation to continue execution. The checkpointing is accomplished by causing the process to dump core, then combining parts of the core file with parts of the original executable. The software keeps track of what file have been opened and re-opens them after return from a checkpoint. This is accomplished by linking the user program with special versions of "crt0.o" and "libc.a". Condor is available without charge by anonymous ftp from "shorty.cs.wisc.edu" (128.105.2.8). Just log in as "ftp" and give your user name for a password. Then "cd" to the condor directory and take a look at the Readme file. You will be instructed to fetch a compressed binary file, remember to have your ftp set to "binary" mode for that. The checkpointing is set up so you can use it without process migration or remote execution if that is desired. It is able to run and compile on a Sequent Symmetry. -- mike ----------------------------- From: Leslie Mikesell <les@chinet.chi.il.us> Subject: Re: help sought - securing a terminal/line Date: 14 Aug 90 16:18:16 GMT To: info-unix@sem.brl.mil In article <3868@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: [ttymon] >And also gives you a few additional bells and whistles, such as >autobauding (not the bit where you hit BREAK to get it to cycle through >speeds, although "ttymon" does support that, but the bit where you type >a character and, based on what the character looked like, "ttymon" >guesses the speed of the line; same sort of thing as the 4.[23]BSD "getty" >supports). Does anything support the now-ubiquituous devices that announce the connection speed in ASCII before bringing up CD or does everyone still have to write their own code for this if they don't want the users to have to send something before getting the login prompt? Les Mikesell les@chinet.chi.il.us ----------------------------- From: Dave Holcomb <dave@hera.scs.com> Subject: RE: 'foo bar' <- What's the meaning of? Date: 14 Aug 90 16:33:51 GMT Sender: Unknown@caeco.uucp To: info-unix@sem.brl.mil In addition to the military reference to an items state of repair, my VAX HARDWARE HANDBOOK (1982-1983), on page 293, discusses the Failed UNIBUS Address Registers (FUBAR): (I quote) The FUBAR contains the upper 16 bits of the UNIBUS address translated from an SBI address during a previous software-initiated data transfer. The occurrence of either of two errors indicated in the status register will lock the FUBAR: UNIBUS Select Time Out (UBSTO) and UNIBUS Slave Sync Time OUT (UBSSYNTO). When the error bit is cleared the register will be unlocked. Obviously, the original purveyors of "foo bar" (i.e. the original BSD UNIX crew) saw the reference in the VAX manual; saw that the DEC VAX designers had had a "field-day" when they designed the hardware [and laughed even harder when the DEC censors blindly accepted the register "designation"], and "ran" with the joke. -- Dave Holcomb, Mentor Graphics, Silicon Design Division (formerly SCS/CAECO) 5295 South 300 West Suite 300 Murray, UT 84107-4763 USA (801)265-8007 caeco!dave@cs.utah.edu ----------------------------- From: Peter Scott <pjs@aristotle.jpl.nasa.gov> Subject: rogue df processes snarfing cpu Date: 14 Aug 90 18:08:58 GMT Sender: Usenet <news@elroy.jpl.nasa.gov> Followup-To: comp.unix.questions Nntp-Posting-Host: aristotle.jpl.nasa.gov To: info-unix@sem.brl.mil One of our machines has been down with a disk problem for a few days, and therefore the partitions that were NFS-mounted on that machine are unavailable to the other machines using the same NFS filesystem. I have typed "df" a few times to look at the filesystem usage and while it gives me the prompt back at the end of the output, it later responds that the other machines's NFS server is dead, and keeps trying. We now have several "df" processes running and raising the load average quite obnoxiously, and I don't know how to get rid of them. Kill or kill -9 doesn't work. Suggestions? SunOS 4.0.3, Sun 3/160. -- This is news. This is your | Peter Scott, NASA/JPL/Caltech brain on news. Any questions? | (pjs@aristotle.jpl.nasa.gov) ----------------------------- From: jian@kuhub.cc.ukans.edu Subject: How to issue a C SHELL command within a C program Date: 14 Aug 90 18:31:33 GMT To: info-unix@sem.brl.mil How can I issue a statment that executes a C SHELL command within a C program? I would appreciate any helps. Jian Q. Li jian@kuhub.cc.ukans.edu ----------------------------- From: kahlers@ux1.cso.uiuc.edu Subject: Re: How to issue a C SHELL command with Date: 14 Aug 90 21:42:00 GMT Nf-ID: #R:<25279:26:ux1.cso.uiuc.edu:22000008:000:429 Nf-From: ux1.cso.uiuc.edu!kahlers Aug 14 16:42:00 1990 To: info-unix@sem.brl.mil > How can I issue a statment that executes a C SHELL command within a C program? > I would appreciate any helps. You can use the "system" call. Use "man system" for more info. =============================================================================\n\ Kem Ahlers kahlers.ux1.cso.uiuc.edu (Internet) \n\ Caterpillar, Inc. u36009@ncsagate (Bitnet) \n\ Peoria, IL USA " ----------------------------- From: BURNS <gt0178a@prism.gatech.edu> Subject: Re: How to issue a C SHELL command with Date: 15 Aug 90 07:04:54 GMT To: info-unix@sem.brl.mil in article <22000008@ux1.cso.uiuc.edu>, kahlers@ux1.cso.uiuc.edu says: Nf-ID: #R:<25279:26:ux1.cso.uiuc.edu:22000008:000:429 Nf-From: ux1.cso.uiuc.edu!kahlers Aug 14 16:42:00 1990 >> How can I issue a statment that executes a C SHELL command within a C program? >> I would appreciate any helps. > > You can use the "system" call. Use "man system" for more info. The system call uses bourne sh, so this won't work unless the command you pass to system is 'csh mycommand', which would be inefficient (sh calls csh calls mycommand). Probably a skeleton like the following is needed: #include <stdio.h> #include <sys/wait.h> char mycommand[] = "history"; main() { union wait status; int pid,some_status=1,some_other_status=2; /* char mycommand[10] = "history";*/ fflush(0); /* optional - check syntax on your system */ switch (fork()) { case -1: perror(); exit(some_status); /* fork failed */ break; case 0: /* child proc */ execlp("/bin/csh","csh","-c",mycommand,(char *) 0); /* the -c is used when mycommand is a builtin */ exit(some_other_status); /* exec failed */ break; default: /* parent */ pid=wait(status); break; } } -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: rohan kelley <rk@bigbroth.uucp> Subject: need help with FATAL error in unix 3.2u Keywords: parity error, NMI, floppy access, gateway2000 Date: 14 Aug 90 18:54:47 GMT To: info-unix@sem.brl.mil Problems with unix 3.2u BellTech (Interactive) installation in Gateway2000-25 cache system. Error message: FATAL:Parity error on the motherboard PANIC:Parity error address unknown Trying to dump 1024 pages (etc) The kernal debugger automatically loads. The message is different each time the sytem crashes. The following is an example of one message: NMI debugger entered from df_dstack +300048f7 EAX EBX ECK EDX ESI EDI EBP ESP 00000060 0000033a 00000130 000084ff 00000000 0000e83d 0000e7f6 e0000e68 CS SS DS ES FS GS EPI EFL 000002bc 000202bc e0000000 00000000 00000000 00000000 000048f7 00020246 (Unfortunately, I don't know enough to use the debugger to go in and examine the kmem file to see what actually happened.) During other crashes, the debugger typically enters from a much lower stack number, for example, 00000006, although the number is not consistent from crash to crash. HELP: I'm stumped and the tech at Gateway2000 is stumped, although they claim to have unix running on 3 of their boxes in house, presumably running their network. I'm trying to send 2 kids off to college with these systems up and running. If I can't solve this problem pretty fast I'll have to regurn the systems to Gateway (and pay the freight) and my 30 day return window is fast closing. Any help would be sincerely appreciated. Please Email or call collect if you have any solutions. Comment: The system software is version 3.2u BellTech (now intel) which is a vanilla interactive port. The "u" upgrade among other things repaired the ESDI driver so it now works consistently. This same software is running happily on my intel 302 25mh cached Phoenix bios machine with a large ESDI drive and on a noname motherboard with an AMI bios, cached, and an MFM small drive. Locus merge 386 is also installed on all machines. Inducing condition: Crash occurs when accessing the floppy drive (either 0 or 1) but only at intermittent times. Commands current have been cpio and format. If the command begins to function normally, it will terminate normally. For example, using the "installpkg" command on the C development set of 4 disks, ran normally, but immediately after, trying to format a high density floppy failed. Hardware configuration: Micronics motherboard with intel 80306DX-25 and 80385 cache controller 64K cache on motherboard 4Mb memory in 4 1-MB simms on motherboard Phoenix Bios Microscience 5100 110 Mb ESDI drive with Ultra 12(F) cached controller. (for 2 floppy and 1 hard disk) ATI SVGA video board with CrystalScan monitor absent 80387 no network or LAN installed. Currently running as stand-alone. System configuration: Disk formatted, partition 1 27 Mb dos, partition 2 (balance) unix. (dos partition empty - no system or files loaded) Disk controller jumpered to set Bios address at C800:0 System board switch set NOT to relocate video bios into ram System board switch set NOT to relocate system bios into ram (Unsuccessful) attempts to correct problem: 1. Disable, alternatively, and then collectively, the disk controller cache and the motherboard cache. 2. Load up an identically configured system (I ordered 2) to determine if there is a hardware malfunction. No change in the problem. 3. Jumper the motherboard to reset the floppy I/O port to its secondary address (370-377) from primary at (3f0-3f7). Bios advised of incorrect setup on boot. I note in my intel 302 manual, at secton 3.7.9, it reads: "3.7.9 UNIX MODE Difference between a UNIX operating system and a non-UNIX operating sytem require a corresponding change in extended mmemory mapping. Non-UNIX operating systems such as DOS or OS/2, require the BIOS to be mapped to the upper part of the 16M address spaece. Even if the sytem memory exceeds 16M, the memory addresses from 15.5M to 16M will be reserved for the BIOS. A UNIX operating sytem has no such requirement and so all extended memory is available. As shown on Table 3-13, jumper pins E37 through E39 determine which operating system is enabled." Any help or suggestions would be sincerely appreciated Thanx much ======================================================================= Rohan Kelley -- UNIleX Systems, Inc. (Systems and software for lawyers) UUCP: ...{gatech!uflorida,ucf-cs}!novavax!bigbroth!rk (office) novavax!mdlbrotr!rk (home) ATTmail: attmail!bigbroth!rk 3365 Galt Ocean Drive, Ft. Lauderdale, FL 33308 Phone: (305) 563-1504 "Go first class or your heirs will" -somebodyelse ======================================================================= ----------------------------- From: Brian Glendenning <bglenden@mandrill.cv.nrao.edu> Subject: CVS Questions Date: 14 Aug 90 19:56:46 GMT Sender: news@murdoch.acc.virginia.edu To: info-unix@sem.brl.mil I have a question and a request about CVS: 1) Could someone send me or point me to an archive source for the postscript file of the USENIX article on CVS (man pages would be great too!). (We can't do troff here). 2) What are the major ways (if any) in which CVS has been extended from the system described in that article. 3) What are user experiences of this package (especially if you can compare it to NSE from sun). We have a ~500k line, multi-architecture package of mostly Fortran with some low level C. Any comments about the appropriateness of CVS would be appreciated (currently we have a homebrew system that runs under VMS). Thanks. If possible, please email and I will summarize if there is any interest. -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286 ----------------------------- From: P Sember SNR <psember@shiva.trl.oz> Subject: BSD references Keywords: Unix BSD references Date: 14 Aug 90 20:48:02 GMT Sender: root@trlluna.trl.oz To: info-unix@sem.brl.mil Recently I have been trying to create a bibliography on BSD. However, most references are to System V. I would appreciate some references (Introductory, Intermediate and Advanced) and remarks on books about BSD. Thanks in Advance! -------------- Peter Sember Telecom Research Labs P.O. Box 249 Clayton, Victoria 3168 Australia Tel. +61-(0)3-5416127 Internet: p.sember@trl.oz.au ----------------------------- From: Brian Glendenning <bglenden@mandrill.cv.nrao.edu> Subject: directory reading Date: 15 Aug 90 00:21:50 GMT Sender: news@murdoch.acc.virginia.edu To: info-unix@sem.brl.mil I'm converting some old directory reading code to get it to work on the latest version of Convex OS (8.1). The old code contained: struct direct *dp; [...] if (dp->d_ino == 0) continue; Presumably because the reading routines could return non-null pointers that contained invalid (deleted or whatever) directory entries. It looks like modern readdir(3)'s only return pointers to valid entries, and NULL at the end, so a test of this type is no longer required. True? Thanks! Brian -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286 ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: VMS compress utility Date: 15 Aug 90 01:02:32 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil Is there a VAX/VMS compression/decompression utility that is compatible with the standard Unix compress utility? Information appreciated. /ivo welch ivo@next.agsm.ucla.edu [128/97/74/50] ----------------------------- From: Bill Masek <bill@frog.uucp> Subject: ELF object formats for i386 (V.4) Keywords: debugger Date: 15 Aug 90 01:19:00 GMT To: info-unix@sem.brl.mil We are using a third party debugger and we want to debug ELF files. I am looking for some documentation about understanding the symbol table and line numbers. I have looked in the programmer's reference manual, programmer's user guide, general ABI interface and several processor specific abi supplements with no success. Where is it described in enough detail to use? Thank you for your help -- bill masek charles river data associates (617) 491-5320 (h) (508) 626-1122 (w) ----------------------------- From: "John R. Schutz" <john@csrnxt1.ae.utexas.edu> Subject: A non-shell outable editor Keywords: editor, no-shell, security Date: 15 Aug 90 02:02:30 GMT Sender: news@ut-emx.uucp Posted: Tue Aug 14 21:02:30 1990 To: info-unix@sem.brl.mil Hello once again! I thank the many people who sent replies to my earlier question about limiting access to a certain user to only run our nn newsreader. Anyways, here is a summary of responses: One person said (this is basically what it meant): forget it, if you want to restrict access, restrict COMPLETE access, i.e. don't let them on. Many, many people said that I should edit the .login or .profile file to automatically go into nn. The problem with this is that nn has a shell escape, but I am hacking that bit out for this user Also, the editor I use has a shell escape, but I don't have the source for this. One person said that I should write a C program to do something similiar to the above. But it also has the same holes. One person said use rsh, or the "restricted shell". This seemed like the best solution at the time, but I checked and the only rsh I have stands for "remote shell". I am currently looking into this. Pointers to source would be appreciated. So this leaves me at the point of finding an editor that has no shell-escaping capabilities. Any ideas on this one? <Waits for another mailbox flood.> Anyways, thanks everyone for the replies. If anyone needs the examples that these many kind people sent, send mail, and I will send back all the replies I received. Thank you. john -- | John R. Schutz | Internet&NeXTmail: john@csrnxt1.ae.utexas.edu | | Center for Space Research | Standard Disclaimer | "I'm mentally | | Programmer (NeXT) | unstable, cracked, and clinically insane. | | Etc. | Besides that, I'm perfectly normal." -me | ----------------------------- End of INFO-UNIX Digest ***********************
alan@mq.UUCP (Alan H. Mintz) (08/19/90)
In article <24208@adm.BRL.MIL>, postmaster@sandia.gov (SMTP MAILER) writes: > > ----Reason for mail failure follows---- > Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : > Could not be delivered for three days. > > ----Transcript of message follows---- ...followed by a trace and a copy of INFO-UNIX digest. Am I missing something or should this bounce back to BRL.MIL, not this group ? Seems like we see this a couple times a month. -- < Alan H. Mintz | Voice +1 714 980 1034 > < Micro-Quick Systems, Inc. | FAX +1 714 944 3995 > < 10384 Hillside Road | uucp: ...!uunet!mq!alan > < Alta Loma, CA 91701 USA | Internet: alan@MQ.COM >
postmaster@sandia.gov (SMTP MAILER) (08/19/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 16 Aug 90 06:00:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#118 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Thu, 16 Aug 90 05:48:39 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab21242; 16 Aug 90 5:59 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa21216; 16 Aug 90 5:46 EDT Date: Thu, 16 Aug 90 05:45:40 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#118 Message-ID: <9008160546.aa21216@SEM.BRL.MIL> INFO-UNIX Digest Thu, 16 Aug 1990 V10#118 Today's Topics: Call for Discussion: comp.benchmarks Re: get terminal speed from shell script Filesizes of [mdn]dbm-files Cshell question: taking wordlists as a single string Re: Cshell question: taking wordlists as a single string Re: Recursion without -R Re: Timeout on shell command. Re: redirecting standard i/o from an exec'ed programme Re: directory reading Re: 'foo bar' <- What's the meaning of? Re: -F option for awk More questions about how to issue a C-SHELL command within a C program Re: More questions about how to issue a C-SHELL command within a C program login shell suspend Re: directory "indexer" Re: Compiling GNU Bourne Again SHell (bash) on SUN OS Re: How to issue a C SHELL command within a C program Re: How to issue a C SHELL command with Re: What's wrong with this Bourne shell script? New UNIX Network Questions MACH stripped from AT&T code ? recursive variable substitution in csh getting the exit value of an exec'd program Re: getting the exit value of an exec'd program Wanted: login & getty source (non-AT&T) Re: Spy Programs?? TeX and LaTeX Docs and man pages How does a C program know its input is being redirected? ----------------------------------------------------------------- From: SILL D E <de5@stc06.ctd.ornl.gov> Subject: Call for Discussion: comp.benchmarks Date: 5 Aug 90 21:44:27 GMT Sender: lear@turbo.bio.net Followup-To: news.groups Approved: lear@turbo.bio.net To: info-unix@sem.brl.mil "There are lies, damned lies, and benchmarks," to paraphrase someone whose name escapes me at the moment. Like it or not, though, benchmarks are a fact of life in the computing world. So in the spirit of `knowing thy enemy', I'd like to propose the formation of an unmoderated newsgroup for: - Discussions about benchmarks including: . hardware benchmarks . numeric benchmarks . operating system benchmarks . compiler benchmarks . graphics benchmarks . window system benchmarks . multiple interactive user load simulations . validity of benchmarks/benchmarking . benchmarking as a procurement tool . benchmarking anecdotes - Publishing benchmark results . especially user-run rather than vendor-run - Publishing benchmark source code and availability info . including bug fixes/reports If it's warranted, I'll issue a Call for Votes at least 14 days after this posting. -- Dave Sill (de5@ornl.gov) Martin Marietta Energy Systems Workstation Support ----------------------------- From: Jim Rogers <jimr@hp-lsd.cos.hp.com> Subject: Re: get terminal speed from shell script Date: 13 Aug 90 15:38:11 GMT To: info-unix@sem.brl.mil If your version of stty writes only to stderr then you can redirect that in a useful manner: speed=`stty speed 2>&1` This will place the the speed of your terminal in the variable speed even if stty writes to stderr. Jim Rogers Hewlett Packard Company ----------------------------- From: Axel Dunkel <ad@cat.uucp> Subject: Filesizes of [mdn]dbm-files Date: 14 Aug 90 12:28:17 GMT To: info-unix@sem.brl.mil I want to build a [mn]dbm database with several thousand records about 300 bytes each. Although I know that dbm leaves big holes in its files, they are just too big: 1000 records with 300k of data result in a file of 16 MEGABytes, 2MB of data become a 500 MB file. The problem occurs at backup time: tar/cpio don't leave the holes out and so try to backup several GIGAbytes of data which makes Backups nearly impossible. Any suggestions on how to reduce the filesizes/holes of n/m/dbm? --- Axel Dunkel (ad@cat.de or ad@cat.uucp or ..!unido!cat!ad) C.A.T. Kommunkations-System, Frankfurt, West Germany ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Cshell question: taking wordlists as a single string Date: 14 Aug 90 12:58:11 GMT To: info-unix@sem.brl.mil I have a Csh script called "whatnews" which takes words as arguments and searches the file /usr/lib/news/newsgroups for lines containing any one of those words, the requirement being to show users what newsgroups are there that may be something to do with the searched word. It is not case sensitive (i.e. it uses fgrep -i) whatnews biology "whatnews" then proceeds to show me all lines in /usr/lib/news/newgroups that contain the string "biology". If several words are supplied as a list, whatnews searches the file for each of these words. The difficulty arises because I want to do (for example) whatnews "bug reports" where the intended effect is to search out all lines containing the string "bug reports". At the moment it splits this up into "bug" and "reports" and does two searches. This is because the script contains a foreach i ($*) loop for repeated searches. Quoting (single or double) doesn't help. Basically, then, can Cshell cope with word-lists as single arguments, or must I write a C program to do the job (or try sh or ksh?) No joy as yet with TFM. Any help appreciated; email probably best. I will summarise if possible. Thanks for listening. -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 06:59:17 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk>, andy@syma (Andy Clews) writes: | I have a Csh script called "whatnews" which takes words as arguments and | searches the file /usr/lib/news/newsgroups for lines containing any one | of those words, the requirement being to show users what newsgroups are | there that may be something to do with the searched word. It is not | case sensitive (i.e. it uses fgrep -i) | | whatnews biology | | "whatnews" then proceeds to show me all lines in /usr/lib/news/newgroups | that contain the string "biology". If several words are supplied as a | list, whatnews searches the file for each of these words. The | difficulty arises because I want to do (for example) | | whatnews "bug reports" | | where the intended effect is to search out all lines containing the | string "bug reports". At the moment it splits this up into "bug" and | "reports" and does two searches. This is because the script contains a | foreach i ($*) | loop for repeated searches. Quoting (single or double) doesn't help. | | Basically, then, can Cshell cope with word-lists as single arguments, or | must I write a C program to do the job (or try sh or ksh?) | | No joy as yet with TFM. Any help appreciated; email probably best. I | will summarise if possible. Thanks for listening. Well, you can try this Perl script: ================================================== snip snip #!/usr/bin/perl for (@ARGV) { s/\W/\\$1/g; # de-magicize $all .= "$_|"; # and create regular-expression } chop($all); # remove last "|" open(G,"/usr/lib/news/newsgroups") || die "Cannot open newsgroups: $!"; while (<G>) { print if /$all/io; } close(G); ================================================== snip snip Untested, but it should do the job. -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Rich Kaul <kaul@icarus.eng.ohio-state.edu> Subject: Re: Recursion without -R Date: 15 Aug 90 00:57:29 GMT Sender: kaul@icarus.eng.ohio-state.edu To: info-unix@sem.brl.mil In article <13595@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: find . -print | xargs chown foo Of course, this only works if you have xargs, which is from System V and is also available on SunOS in their System V software installation option. Or if you were smart enough to grab the free, PD version that Gordon Moffet posted a while ago. I still have a copy sitting around somewhere so drop me a line if you want it. -rich ----------------------------- From: Georg Wittig <wittig@gmdzi.uucp> Subject: Re: Recursion without -R Keywords: recursion Date: 15 Aug 90 09:31:41 GMT To: info-unix@sem.brl.mil rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >What are some quick tricks for getting programs like chmod and chown to >descend into all subdirectories? Programs without a -R option, that is. find . -exec chmod go-rw {} \; --or-- find . -type f -exec chmod go-rw {} \; -- Georg Wittig GMD-Z1.IT | wittig@gmdzi.gmd.de | "Freedom's just another word P.O. Box 1240 | wittig@zi.gmd.dbp.de | for nothing left to lose" D-5205 St. Augustin 1 | | (Kris Kristofferson) West Germany | (+49) 2241 14-2294 | ----------------------------- From: "Liam R. E. Quin" <lee@sq.sq.com> Subject: Re: Timeout on shell command. Date: 15 Aug 90 04:56:49 GMT To: info-unix@sem.brl.mil brister@decwrl.dec.com (James Brister) writes: >I'd like to have a shell script run a command, but if that command doesn't >finish in X seconds, then the script should kill it, if the command >finishes sooner then the script should immediately continue. tchrist@convex.COM (Tom Christiansen) writes: >Here's timeout.c; syntax is 'timeout seconds command'. That is probably the neatest solution. Another way (if you need a shell-only solution) is Process One: # write my PID ($$) to a tmp file, tmp1 echo $$ > $tmp1 # run command $command # mark ourselves as done: /bin/rm -f $tmp1 # if tmp2 exists, kill that process test -f $tmp2 && kill `cat $tmp2` Process Two: # write my PID to a file, tmp2 echo $$ > $tmp2 # wait a while sleep 27 # mark ourselves as done so the other half does not kill us now /bin/rm -f $tmp2 # kill the other half if it is still running test -f $tmp1 && kill `cat $tmp1` Now do ProcessOne & ProcessTwo & wait If you have other background tasks, write these three "lines" out to a temporary file and execute that -- then the wait will only wait for ProcessOne and ProcessTwo. If you don't want the PIDs to appear when you do the Process1 &, you can play tricks with /bin/sh -c "command &" which won't print the PID of the background process on most systems, but only works with simple commands (no |, &&, etc) without care. The variant ( /bin/sh -c "exec 2>&3; command" & ) 3>&2 2>/dev/null works better. It says, ^^^^ Run the thing in ( ) with file descriptor 3 open in addition to the standard 0, 1 and 2 (2 is standard error, used for messages). Make file descriptor 3 be the same as descriptor 2. Having done that, send everything written ^^^^^^^^^^^ on file descriptor 2 (standard error) to /dev/null -- in other words, throw away all error messages. This will throw away the PID, which is what we want, but will also throw away any error messages generated by "command". The exec 2>&3; tells the /bin/sh _inside_ the ( ) to make file descriptor 2 be the same as file descriptor 3, which we previously opened as the original standard error. So this restores standard error messages for the command inside the quotes. Which is what we need. Well, you might say that it would be less arcane to include the C program `timeout' given by Tom Christiansen, and to compile it on the fly, but in practice the commands are likely (I hope) to be simple, and the first form with /bin/sh -c "command" will probably work fine. Lee -- Liam R. E. Quin, lee@sq.com, {utai,utzoo}!sq!lee, SoftQuad Inc., Toronto ----------------------------- From: "Jay A. Konigsberg" <jak@sactoh0.uucp> Subject: Re: Timeout on shell command. Date: 16 Aug 90 02:12:09 GMT To: info-unix@sem.brl.mil In article <1990Aug12.221658.27776@uncle.uucp> donlash@uncle.UUCP (Donald Lashomb) writes: >In article <BRISTER.90Aug10222433@westworld.decwrl.dec.com> brister@decwrl.dec.com (James Brister) writes: >>I'd like to have a shell script run a command, but if that command doesn't >>finish in X seconds, then the script should kill it, if the command >>finishes sooner then the script should immediately continue. Any ideas on ============================================================= >>how one could achieve this? > >I'd approach it like this- > >#!/bin/sh ># ># run the command in the background ># remember its process ID ># sleep for X seconds ># kill the background command --- note: if ># the background command is finished, then ># the kill will fail benignly. ># >command & >cmdpid=$! >sleep $X >kill $cmdpid > When I saw the original post, I almost answered with this type of solution. However, it lacks an important part of the request. If the command finishes early, execution will still wait for the sleep to complete. However, there just may be a way if the sleep is placed in its own file. # main program file SEC={number here} # set the number of seconds to wait command & # execute in background cmdpid = $! # save the PID sleepit $SEC $cmdpid & # sleep in background wait $cmdpid # wait for the process to complete or be killed # sleepit - sleep $1 sec and then kill -9 $2 sleep $1 kill -9 $2 2>/dev/null #don't want those nasty error messages. My thanks to Donald Lashomb's post. Without it, I wouldn't have come up with this solution. -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, its worth doing correctly. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: redirecting standard i/o from an exec'ed programme Keywords: popen, io, exec, system Date: 15 Aug 90 13:29:21 GMT To: info-unix@sem.brl.mil In article <377@fe2o3.UUCP> michael@fe2o3.UUCP (Michael Katzmann) writes: >which execs the command a la "system()" and creates a pipe. "type" and be >"r" if you want to read from the standard output of "command", or "w" if >you want to write to standard input. However there doesn't seem to be any >way to use this routine to do both similtaneously. >What is the usual way to to this? This should probably be added the the FAQ list. The problem with trying to pipe both input and output to an arbitrary slave process is that deadlock can occur, if both processes are waiting for not-yet-generated input at the same time. Deadlock can be avoided only by having BOTH sides follow a strict deadlock-free protocol, but since that requires cooperation from the processes it is inappropriate for a popen()-like library function. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: directory reading Date: 15 Aug 90 13:31:24 GMT To: info-unix@sem.brl.mil In article <BGLENDEN.90Aug14202150@mandrill.cv.nrao.edu> bglenden@mandrill.cv.nrao.edu (Brian Glendenning) writes: > if (dp->d_ino == 0) > continue; >It looks like modern readdir(3)'s only return pointers to valid entries, >and NULL at the end, so a test of this type is no longer required. Yes, all versions of readdir() are expected to filter out "deleted" entries so there is no need to test for that in the application. ----------------------------- From: Chris Torek <chris@mimsy.umd.edu> Subject: Re: 'foo bar' <- What's the meaning of? Date: 15 Aug 90 13:55:44 GMT To: info-unix@sem.brl.mil Please, before asking about `foo', read the introduction to the net and ask locally. It always creates a stream of interminable partial, wrong, or otherwise not-quite-perfect answers which then cause further followups like this one. The word `foo' has been around for a long time. It appeared in old `Smokey Stover' cartoons in the 1920s and/or 30s (often on a license plate or other out-of-the-way place). The connection between `foo', `bar', and `foobar' and `fubar' is obvious; the connection between this foo and the one in the cartoons is less so. In WWII the armed forces came up with a whole series of acronyms, including FUBAR, SNAFU, and JANFU (F-ed Up Beyond All Recognition; Situation Normal---All F-ed Up; Joint Army-Navy F-Up). In the 1970s engineers at DEC designed the `Star' (the VAX-11/780) and snuck a `FUBAR' register into the Unibus adapter. In the 1950s and early 1960s the TMRC (Tech Model Railroad Club) at MIT made much use of many `nonsense words' which eventually became `hacker's jargon'. For details, see _The_Hacker's_Dictionary_ by Guy L. Steel Jr. You will find some of the above and a great deal more (e.g., the distinction between frob and tweak). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750) ----------------------------- From: Irving Wolfe <irv@happym.wa.com> Subject: Re: -F option for awk Keywords: awk field-separator Date: 15 Aug 90 13:57:33 GMT To: info-unix@sem.brl.mil In <491@llnl.LLNL.GOV> rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >print; or print $0; don't do the right thing because the lines come >out with spaces as the field separators instead of the character given >to the -F option. If you change any field, $1 to $NF, then print or print $0 re-composes $0 from all the individual fields, stringing them together with the output separator OFS which defaults to space unless you change it. If you don't touch any fields, awk should just print the originally input $0. Thus awk -F: '/^i/' /etc/passwd (here) produces irv:-------------:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh and awk '/^i/' /etc/passwd produces irv:-------------:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh exactly the same thing. Both print the /etc/passwd lines that begin with i exactly as is. But awk -F: '/^i/ {$2 = "hoho"; print}' /etc/passwd produces: irv hoho 101 1 0000-Irving Wolfe(0000) /u/irv /bin/gsh It will replace all the :s with spaces. You need awk -F: 'BEGIN {OFS = FS} /^i/ {$2 = "hoho"; print}' /etc/passwd which produces irv:hoho:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh -- Irving Wolfe Happy Man Corp. irv@happym.wa.com 206/463-9399 ext.101 4410 SW Point Robinson Road, Vashon Island, WA 98070-7399 fax ext.116 SOLID VALUE, the investment letter for Benj. Graham's intelligent investors Information free (sample $10 check or credit card): email patty@happym.wa.com ----------------------------- From: jian@kuhub.cc.ukans.edu Subject: More questions about how to issue a C-SHELL command within a C program Date: 15 Aug 90 14:09:17 GMT To: info-unix@sem.brl.mil Yesterday I asked for help about how to issue a C-SHELL command within a C program. I was lucky: serveral people came up with immediate answers. I very much appreciate those answers. According to the answers and what I read from the menu, system() and execlp() should work without any doubts. However, I can't make it. What I want to do is to issue a csh command to change terminal type within a C program. I did try: system("csh -cf \"setenv TERM adm3a"); and system("/bin/csh -c 'setenv TERM adm3a"); and execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); There was not any runtime errors if I embeded one of above statements into my C program. But none of them can change the terminal type. I don't know why. Would someone point me another way to change terminal type within a C program or give me some hints what I did wrong. I would appreciate any helps. Jian Q. Li jian@kuhub.cc.ukans.edu ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 15 Aug 90 22:15:04 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub writes: | Yesterday I asked for help about how to issue a C-SHELL command within a C | program. I was lucky: serveral people came up with immediate answers. I very | much appreciate those answers. | | According to the answers and what I read from the menu, system() and execlp() | should work without any doubts. However, I can't make it. What I want to do | is to issue a csh command to change terminal type within a C program. I did | try: | system("csh -cf \"setenv TERM adm3a"); | and | system("/bin/csh -c 'setenv TERM adm3a"); | | and | execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); | | There was not any runtime errors if I embeded one of above statements into my | C program. But none of them can change the terminal type. I don't know why. | Would someone point me another way to change terminal type within a C program | or give me some hints what I did wrong. I would appreciate any helps. Aha. As I said in my private mail, *why* would you want to execute a csh command? Now I can see. The short answer: You *cannot* change an environment variable (such as TERM) from a child process. The shell provides a *copy* of its environment to the children processes (such as your C program), so changes to that copy (or in your case, using a further csh which has its *own* copy), will not affect the parent shell. This is by design, so don't ask "Well, are they going to fix this some day?" The longer answer: If you invoke a program from the shell in such a way that the shell is going to expect an answer back and take action on that, you can get away with it. For example, if your program "pickterm" is invoked from the csh as: setenv TERM `pickterm` then all "pickterm" has to do is output the desired term-type on stdout. If you need interaction, you may need to arrange for the csh to get it from a file. For example, pickterm /tmp/$$ && setenv TERM `cat /tmp/$$` rm /tmp/$$ in which case pickterm would open /tmp/$$ for output, put the desired termtype into it after interacting with the user, and then exit successfully. Either of these solutions could be wrapped up inside an alias to prevent the nitty gritties from being exposed to the poor user. Just another Unix hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 04:48:55 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <1990Aug15.221504.348@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub writes: [ Stuff deleted ] >| execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); >| >| There was not any runtime errors if I embeded one of above statements into my >| C program. But none of them can change the terminal type. I don't know why. >| Would someone point me another way to change terminal type within a C program >| or give me some hints what I did wrong. I would appreciate any helps. >The short answer: >You *cannot* change an environment variable (such as TERM) from a >child process. The shell provides a *copy* of its environment to the >children processes (such as your C program), so changes to that copy >(or in your case, using a further csh which has its *own* copy), will >not affect the parent shell. This is by design, so don't ask "Well, >are they going to fix this some day?" Why not just use the putenv system call with something akin to: putenv("TERM=adm3a"); /* notify subprocess that it is an adm3a terminal */ -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: rjshaw@ramius.llnl.gov Subject: login shell suspend Date: 15 Aug 90 16:29:18 GMT Sender: usenet@llnl.llnl.gov To: info-unix@sem.brl.mil Hi. Who knows the history behind "Can't suspend a login shell (yet)." Is there a day when we will be able to do so, or is the "yet" a joke that I don't understand? When I rlogin somewhere and <RET> ~ CNTL-Z <RET> isn't that a suspension of the login shell on the remote machine? Isn't suspension just sleeping? No, I haven't read either of the internals books yet, but I'm planning to get to the Berkeley one any day now [ half :-) half :-( ] Thanx in advance for responses =============================================================================== rjshaw@ramius.llnl.gov _____ ____ ____ ______ R o b / / / / / / / / / / / -------- / --/ / / / / / / / / / --------------------------- /-- / / / / / / / / S h a w /____/ /_/_/ /_/_/ /_____/ The Cosby's are precisely what's wrong with television today... =============================================================================== ----------------------------- From: Robert Hartman <hartman@ide.com> Subject: Re: directory "indexer" Keywords: search,directory,index Date: 15 Aug 90 16:42:40 GMT Sender: Bert Beaton <bert@ide.com> To: info-unix@sem.brl.mil In article <335@nih-csl.nih.gov> tpersky@alw.nih.gov (Ted Persky) writes: >It has come to my attention that our staff on the whole spends >a great deal of time during the day searching for that one >certain file in a large directory tree. For example, try finding >a certain fragment of source code in the X11 distribution. >The people in our lab always seem to be asking each other >to help them locate the path name for "foo.c". If you have the BSD version of find, you can use the "fast-find" feature to build the database you want. This wasn't documented very well in the BSD man page. However, if you can get at a copy of a Sun 4.x man page, it's documented there. -r ----------------------------- From: Chet Ramey <chet@cwns1.cwru.edu> Subject: Re: Compiling GNU Bourne Again SHell (bash) on SUN OS Date: 15 Aug 90 18:15:54 GMT Sender: news@usenet.ins.cwru.edu Followup-To: gnu.bash.bug To: info-unix@sem.brl.mil In article <24173@adm.BRL.MIL> hsw@sparta.com (Howard Weiss) writes: $ I've got a copy of the Bourne Again SHell (bash) - version 1.05 that $ On the SUN, the make file says that its compiling for a SUN 3 running $ OS 4, but has problems with the bash-Makefile (fixed by commenting out $ the offending lines which are setting up stuff to build backup files) and $ then has problems with compiling y.tab.c (which is the result of running $ yacc on parse.y). I have already gotten and included all the latest $ patches for this version and have sent off a message to bug-bash but $ have not heard anything. $ $ Has anyone had this problem and/or does anyone know of a fix. I'm not $ versed in yacc (and don't really want to be). The yacc problem is solved by changing the lines in parse.y that read if (interactive) YYACCEPT; else YYABORT; to read if (interactive) { YYACCEPT; } else { YYABORT; } YYACCEPT and YYABORT became compound statements in SunOS 4.1 yacc. You will also need to use the SunOS malloc, because of the `localtime' bug (take USE_GNU_MALLOC out of the appropriate section in machines.h). There are a number of problems with bash 1.05. All have been fixed for the next release (whenever that is). Chet -- Chet Ramey ``Levi Stubbs' tears run down Network Services Group his face...'' Case Western Reserve University chet@ins.CWRU.Edu ----------------------------- From: Ambarish Malpani <ambarish@gandhi.uucp> Subject: Re: How to issue a C SHELL command within a C program Date: 15 Aug 90 18:23:15 GMT To: info-unix@sem.brl.mil In article <25279.26c7fd35@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: >How can I issue a statment that executes a C SHELL command within a C program? >I would appreciate any helps. > >Jian Q. Li >jian@kuhub.cc.ukans.edu Try using the system() library routine eg. system("pwd"); Ambarish sun!valid!ambarish ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: How to issue a C SHELL command with Date: 15 Aug 90 20:28:08 GMT To: info-unix@sem.brl.mil >> How can I issue a statment that executes a C SHELL command within a C program? >> I would appreciate any helps. > >You can use the "system" call. Use "man system" for more info. Well, sort of. In order to run a *C* shell command, as the original poster specified, rather than a *Bourne* shell command, as "system()" does on any valid implementation, you have to construct a Bourne shell command that runs the C shell, asking it to run a C shell command.... In general, I'd recommend replacing the C shell command in question with a Bourne shell command, if at all possible, and just using "system()". ----------------------------- From: Mark Harrison <harrison@necssd.nec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 15 Aug 90 18:36:10 GMT To: info-unix@sem.brl.mil In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc.wec.com (Frank P. Bresz) writes: > Where is Jon's addcol. I tried to write one a while back and kept > screwing it up. I would like to see a working version. Here is a simple one in awk. Replace $4 with your column number. awk '{ tot += $4} END{print tot}' ^^ If you put this into a shell script called addcol, you can say awk '{ tot += $'$1'} END{print tot}' and invoke it by addcol 4 Example: How many bytes in my files? ls -l c* | awk '{ tot += $4} END{print tot}' ls -l c* | addcol 4 Hope this helps! -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply... ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 16 Aug 90 04:54:19 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <1990Aug14.171056.17982@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: >| >or if you have Jon's addcol, even simpler: >| >| > stat -s * | addcol -2 >| >| Where is Jon's addcol. I tried to write one a while back and kept >| screwing it up. I would like to see a working version. >for addcol -1, try: > perl -ane '$s += $F[0]; print "$s\n" if eof;' >for addcol -2: > perl -ane '$s += $F[1]; print "$s\n" if eof;' >Others may be derived by noticing the pattern. :-) >Just another Perl hacker, That would be fine if I had or wanted pearl. I was under the impression that Jon's addcol was an awk script (I think that's where the original thread came from anway) in which the -# was the column you wanted to add and it would magically add up the numbers in column 1 or 7 or whatever column you wanted under argumentalized control instead of having separate scripts for each possible set of columns you want to add. -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Chuck Brown <univac@pirates.uucp> Subject: New UNIX Network Questions Keywords: sequent unisys banyan government Date: 15 Aug 90 18:59:30 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil We (City of Savannah) are in the first phases of a conversion from a Unisys 1100/90 mainframe environement to a UNIX environment. Our network will (if current plans hold out) consist of a reasonably large UNIX box (Sequent / Unisys), an inter-building fiber backbone, and 6 Banyan servers with 400-600 nodes, all 386sx/VGA systems. The applications on the UNIX system will all be accounting based. The Banyan applications will be Word Processing, e-mail, spreadsheet, general office productivity) The UNIX applications will be primarily Informix based. Several questions have come up, and we would appreciate any information, comments, or critisims. - What would be the reason for selection of Unisys over Sequent, if any, since the box is physically the same? (U6000/80, 10 processors, 128 meg, 9 gig of mass storage). - Banyan claims that this type of arrangement will be difficult to manage with Novell, Novell claims otherwise. Opinions? - Applications we are looking for for this and other areas include: Municiple (fund) accounting Police/Fire Computer Aided Dispatch Parking Citations Utility Billing Vehicle Maintenance All comments welcome! Thanks in advance. ============================================================================== Chuck Brown City Of Savannah Systems Programmer 133 Montgomery St. Voice: (912) 944-4793 Room 507 uunet\!pirates\!univac Savannah, GA 31402 ============================================================================== ----------------------------- From: Klaus Moeller <moeller@uniol.uucp> Subject: MACH stripped from AT&T code ? Date: 15 Aug 90 19:58:40 GMT To: info-unix@sem.brl.mil Hi It was said somewhere( I don't know where) that the MACH Kernel contains no AT&T code anymore. Is this right or has somebody made a joke or is this planned for the future? As far as I know, MACH still contains BSD code and BSD contains AT&T code. Has the AT&T code been removed from MACH or is it still in the system via the BSD code ? Thanks Klaus -- / Klaus Moeller, Leiteweg 2, 2940 Wilhelmshaven, West - Germany \ < moeller@uniol.uucp 078326@DOLUNI1.BITNET > \ Fill what's empty, empty what's full and scratch where it itches / ----------------------------- From: Jeff MacDonald <jmacdon@cg-atla.agfa.com> Subject: recursive variable substitution in csh Date: 15 Aug 90 21:49:37 GMT To: info-unix@sem.brl.mil In the C-shell, how does one evaluate a variable which contains the name of a variable in order to get the value of the variable contained by the variable that one is evaluating? To wit: set x = 'ABC' set y = '$x' set z = # some function of y such that $z == "ABC" Don't ask how I got into this predicament, it's not funny! -- Jeff MacDonald ([decvax|samsung|ima|ulowell]!cg-atla!jmacdon) Agfa/Compugraphic Division 200-2-9F (jmacdon@cg-atla.agfa.com) 200 Ballardvale, Wilmington MA 01887 (508) 658-0200, extension 5406 Hi, Mom! ----------------------------- From: Atul Parulekar <atul@ncoast.org> Subject: getting the exit value of an exec'd program Date: 15 Aug 90 22:39:52 GMT To: info-unix@sem.brl.mil May be the answer is in the manual, but I have not been able to find it. My problem is that if I run a program using fork and execvp, how do I get the exit value of the exec'd program into the main program. ----------------------------- From: "BURNS,JIM" <gt0178a@prism.gatech.edu> Subject: Re: getting the exit value of an exec'd program Date: 16 Aug 90 04:25:11 GMT To: info-unix@sem.brl.mil in article <1990Aug15.223952.1175@NCoast.ORG>, atul@NCoast.ORG (Atul Parulekar) says: > May be the answer is in the manual, but I have not been able to find it. > My problem is that if I run a program using fork and execvp, how do I get > the exit value of the exec'd program into the main program. Exec doesn't return a status - it doesn't return at all. Use wait(2) in the parent program. Its man page describes the union wait status variable returned by wait(2) and its variants. (Exact return type also varies between wait() variants and diff. unices.) -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: Mike Van Pelt <mvp@hsv3.uucp> Subject: Wanted: login & getty source (non-AT&T) Date: 15 Aug 90 23:41:37 GMT To: info-unix@sem.brl.mil Is there a public domain and/or copylefted (i.e., GNU) version of the getty and login programs that do not require an AT&T source liscence? I would like to add some local security features here, and this would be very helpful. (We're running SunOS, which is BSD-derived.) Please email, and I will summarize any responses. -- Mike Van Pelt Headland Technology/Video 7 Use a pun, go to jail. ...ames!vsi1!v7fs1!mvp ----------------------------- From: "Jay A. Konigsberg" <jak@sactoh0.uucp> Subject: Re: Spy Programs?? Date: 16 Aug 90 01:46:26 GMT To: info-unix@sem.brl.mil In article <24123@adm.BRL.MIL> senetza@hg.uleth.ca (Leonard Senetza) writes: >I have a few 'hostile' users on my system here. I was wondering if anyone has >a 'spy' type of program that would allow me to watch/record/control other >users' sessions. I could possibly write one myself, but why re-invent the >wheel? > There are a few ways to do this. However, assuming you _are_ the administrator of the system, there is one reasonably easy way. Take the cables running to these hostile users terminals and splice into them. Assuming everyone (including yourself) is using the same type of terminal, you can then run the T from the splice to your terminal. To be on the safe side, you probably don't want to connect the "write" pin (2 or 3, I can never remember). Other options include re-writing the shell, taping into their history file and putting a `tee -a` into their .profile. Each method has varying levels of information available. One last option, available to anyone on a system, is to write a shell daemon that does periodic "ps -lfu u_name" (or similar) to check their processes and CPU activity. While this meathod doesn't show exactly what a user is doing, it does provide useful information to an administrator. -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, its worth doing correctly. ----------------------------- From: Rob Freyder <rob@lafayet.uucp> Subject: TeX and LaTeX Docs and man pages Date: 16 Aug 90 02:39:50 GMT To: info-unix@sem.brl.mil I have binaries for TeX and LaTeX for Xenix... but I need docs and man pages ... Can someone tell where I can get via anonymous uucp... or by email ?? Thanks. -- Rob Freyder Core Laboratories a division of ____ ____ ____ Western Atlas International Inc. \ \ / /\ / /\ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- \ \/ / \ / / \ Humans (318) 235-9431 \ / / \ / /\ \ Internet rob@lafayet.UUCP \/___/ \/___/ \___\ Bang ...!uunet!rouge!lafayet!rob ----------------------------- From: "M. Pinghua Young" <mpyoung@portia.stanford.edu> Subject: How does a C program know its input is being redirected? Keywords: input, stdin, redirect, pipe, C program Date: 16 Aug 90 05:00:13 GMT Sender: "M. Pinghua Young" <mpyoung@portia.stanford.edu> To: info-unix@sem.brl.mil I am writing a program that prompts users for various inputs. However, the user can also put the input in a file and pipe it to my program, or use input redirection "<". In this case I don't want the program to prompt anything. Can anyone tell me how to achieve that? Please send me e-mails. Thank! -- | M. Pinghua Young | Confucius Said: | | pinghua@suwatson.bitnet | "Life Begins at 30" | | mpyoung@portia.stanford.edu | But He Died At 29. | ----------------------------- End of INFO-UNIX Digest ***********************
mcdonald@aries.scs.uiuc.edu (Doug McDonald) (08/19/90)
In article <24213@adm.BRL.MIL> postmaster@sandia.gov (SMTP MAILER) writes: > > ----Reason for mail failure follows---- >Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : > Could not be delivered for three days. > > ----Transcript of message follows---- >Date: 16 Aug 90 06:00:00 MDT >From: info-unix@BRL.MIL >Subject: INFO-UNIX Digest V10#118 >To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> > >Return-Path: <incoming-info-unix-request@sandia.gov> >Received: from SEM.BRL.MIL by sandia.gov with SMTP ; > Thu, 16 Aug 90 05:48:39 MDT >Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab21242; 16 Aug 90 5:59 EDT >Received: from sem.brl.mil by SEM.BRL.MIL id aa21216; 16 Aug 90 5:46 EDT >Date: Thu, 16 Aug 90 05:45:40 EST >From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> >To: INFO-UNIX@BRL.MIL >Reply-To: INFO-UNIX@BRL.MIL >Subject: INFO-UNIX Digest V10#118 >Message-ID: <9008160546.aa21216@SEM.BRL.MIL> > Can some Usenet guru stop these things from getting posted? How can bounced mail get POSTED???? Doug McDonald
postmaster@sandia.gov (SMTP MAILER) (08/19/90)
----Reason for mail failure follows---- Sending mail to <math!ckaul@cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 16 Aug 90 06:08:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#118 To: "math!ckaul" <math!ckaul@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Thu, 16 Aug 90 05:48:39 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab21242; 16 Aug 90 5:59 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa21216; 16 Aug 90 5:46 EDT Date: Thu, 16 Aug 90 05:45:40 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#118 Message-ID: <9008160546.aa21216@SEM.BRL.MIL> INFO-UNIX Digest Thu, 16 Aug 1990 V10#118 Today's Topics: Call for Discussion: comp.benchmarks Re: get terminal speed from shell script Filesizes of [mdn]dbm-files Cshell question: taking wordlists as a single string Re: Cshell question: taking wordlists as a single string Re: Recursion without -R Re: Timeout on shell command. Re: redirecting standard i/o from an exec'ed programme Re: directory reading Re: 'foo bar' <- What's the meaning of? Re: -F option for awk More questions about how to issue a C-SHELL command within a C program Re: More questions about how to issue a C-SHELL command within a C program login shell suspend Re: directory "indexer" Re: Compiling GNU Bourne Again SHell (bash) on SUN OS Re: How to issue a C SHELL command within a C program Re: How to issue a C SHELL command with Re: What's wrong with this Bourne shell script? New UNIX Network Questions MACH stripped from AT&T code ? recursive variable substitution in csh getting the exit value of an exec'd program Re: getting the exit value of an exec'd program Wanted: login & getty source (non-AT&T) Re: Spy Programs?? TeX and LaTeX Docs and man pages How does a C program know its input is being redirected? ----------------------------------------------------------------- From: SILL D E <de5@stc06.ctd.ornl.gov> Subject: Call for Discussion: comp.benchmarks Date: 5 Aug 90 21:44:27 GMT Sender: lear@turbo.bio.net Followup-To: news.groups Approved: lear@turbo.bio.net To: info-unix@sem.brl.mil "There are lies, damned lies, and benchmarks," to paraphrase someone whose name escapes me at the moment. Like it or not, though, benchmarks are a fact of life in the computing world. So in the spirit of `knowing thy enemy', I'd like to propose the formation of an unmoderated newsgroup for: - Discussions about benchmarks including: . hardware benchmarks . numeric benchmarks . operating system benchmarks . compiler benchmarks . graphics benchmarks . window system benchmarks . multiple interactive user load simulations . validity of benchmarks/benchmarking . benchmarking as a procurement tool . benchmarking anecdotes - Publishing benchmark results . especially user-run rather than vendor-run - Publishing benchmark source code and availability info . including bug fixes/reports If it's warranted, I'll issue a Call for Votes at least 14 days after this posting. -- Dave Sill (de5@ornl.gov) Martin Marietta Energy Systems Workstation Support ----------------------------- From: Jim Rogers <jimr@hp-lsd.cos.hp.com> Subject: Re: get terminal speed from shell script Date: 13 Aug 90 15:38:11 GMT To: info-unix@sem.brl.mil If your version of stty writes only to stderr then you can redirect that in a useful manner: speed=`stty speed 2>&1` This will place the the speed of your terminal in the variable speed even if stty writes to stderr. Jim Rogers Hewlett Packard Company ----------------------------- From: Axel Dunkel <ad@cat.uucp> Subject: Filesizes of [mdn]dbm-files Date: 14 Aug 90 12:28:17 GMT To: info-unix@sem.brl.mil I want to build a [mn]dbm database with several thousand records about 300 bytes each. Although I know that dbm leaves big holes in its files, they are just too big: 1000 records with 300k of data result in a file of 16 MEGABytes, 2MB of data become a 500 MB file. The problem occurs at backup time: tar/cpio don't leave the holes out and so try to backup several GIGAbytes of data which makes Backups nearly impossible. Any suggestions on how to reduce the filesizes/holes of n/m/dbm? --- Axel Dunkel (ad@cat.de or ad@cat.uucp or ..!unido!cat!ad) C.A.T. Kommunkations-System, Frankfurt, West Germany ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Cshell question: taking wordlists as a single string Date: 14 Aug 90 12:58:11 GMT To: info-unix@sem.brl.mil I have a Csh script called "whatnews" which takes words as arguments and searches the file /usr/lib/news/newsgroups for lines containing any one of those words, the requirement being to show users what newsgroups are there that may be something to do with the searched word. It is not case sensitive (i.e. it uses fgrep -i) whatnews biology "whatnews" then proceeds to show me all lines in /usr/lib/news/newgroups that contain the string "biology". If several words are supplied as a list, whatnews searches the file for each of these words. The difficulty arises because I want to do (for example) whatnews "bug reports" where the intended effect is to search out all lines containing the string "bug reports". At the moment it splits this up into "bug" and "reports" and does two searches. This is because the script contains a foreach i ($*) loop for repeated searches. Quoting (single or double) doesn't help. Basically, then, can Cshell cope with word-lists as single arguments, or must I write a C program to do the job (or try sh or ksh?) No joy as yet with TFM. Any help appreciated; email probably best. I will summarise if possible. Thanks for listening. -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 06:59:17 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk>, andy@syma (Andy Clews) writes: | I have a Csh script called "whatnews" which takes words as arguments and | searches the file /usr/lib/news/newsgroups for lines containing any one | of those words, the requirement being to show users what newsgroups are | there that may be something to do with the searched word. It is not | case sensitive (i.e. it uses fgrep -i) | | whatnews biology | | "whatnews" then proceeds to show me all lines in /usr/lib/news/newgroups | that contain the string "biology". If several words are supplied as a | list, whatnews searches the file for each of these words. The | difficulty arises because I want to do (for example) | | whatnews "bug reports" | | where the intended effect is to search out all lines containing the | string "bug reports". At the moment it splits this up into "bug" and | "reports" and does two searches. This is because the script contains a | foreach i ($*) | loop for repeated searches. Quoting (single or double) doesn't help. | | Basically, then, can Cshell cope with word-lists as single arguments, or | must I write a C program to do the job (or try sh or ksh?) | | No joy as yet with TFM. Any help appreciated; email probably best. I | will summarise if possible. Thanks for listening. Well, you can try this Perl script: ================================================== snip snip #!/usr/bin/perl for (@ARGV) { s/\W/\\$1/g; # de-magicize $all .= "$_|"; # and create regular-expression } chop($all); # remove last "|" open(G,"/usr/lib/news/newsgroups") || die "Cannot open newsgroups: $!"; while (<G>) { print if /$all/io; } close(G); ================================================== snip snip Untested, but it should do the job. -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Rich Kaul <kaul@icarus.eng.ohio-state.edu> Subject: Re: Recursion without -R Date: 15 Aug 90 00:57:29 GMT Sender: kaul@icarus.eng.ohio-state.edu To: info-unix@sem.brl.mil In article <13595@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: find . -print | xargs chown foo Of course, this only works if you have xargs, which is from System V and is also available on SunOS in their System V software installation option. Or if you were smart enough to grab the free, PD version that Gordon Moffet posted a while ago. I still have a copy sitting around somewhere so drop me a line if you want it. -rich ----------------------------- From: Georg Wittig <wittig@gmdzi.uucp> Subject: Re: Recursion without -R Keywords: recursion Date: 15 Aug 90 09:31:41 GMT To: info-unix@sem.brl.mil rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >What are some quick tricks for getting programs like chmod and chown to >descend into all subdirectories? Programs without a -R option, that is. find . -exec chmod go-rw {} \; --or-- find . -type f -exec chmod go-rw {} \; -- Georg Wittig GMD-Z1.IT | wittig@gmdzi.gmd.de | "Freedom's just another word P.O. Box 1240 | wittig@zi.gmd.dbp.de | for nothing left to lose" D-5205 St. Augustin 1 | | (Kris Kristofferson) West Germany | (+49) 2241 14-2294 | ----------------------------- From: "Liam R. E. Quin" <lee@sq.sq.com> Subject: Re: Timeout on shell command. Date: 15 Aug 90 04:56:49 GMT To: info-unix@sem.brl.mil brister@decwrl.dec.com (James Brister) writes: >I'd like to have a shell script run a command, but if that command doesn't >finish in X seconds, then the script should kill it, if the command >finishes sooner then the script should immediately continue. tchrist@convex.COM (Tom Christiansen) writes: >Here's timeout.c; syntax is 'timeout seconds command'. That is probably the neatest solution. Another way (if you need a shell-only solution) is Process One: # write my PID ($$) to a tmp file, tmp1 echo $$ > $tmp1 # run command $command # mark ourselves as done: /bin/rm -f $tmp1 # if tmp2 exists, kill that process test -f $tmp2 && kill `cat $tmp2` Process Two: # write my PID to a file, tmp2 echo $$ > $tmp2 # wait a while sleep 27 # mark ourselves as done so the other half does not kill us now /bin/rm -f $tmp2 # kill the other half if it is still running test -f $tmp1 && kill `cat $tmp1` Now do ProcessOne & ProcessTwo & wait If you have other background tasks, write these three "lines" out to a temporary file and execute that -- then the wait will only wait for ProcessOne and ProcessTwo. If you don't want the PIDs to appear when you do the Process1 &, you can play tricks with /bin/sh -c "command &" which won't print the PID of the background process on most systems, but only works with simple commands (no |, &&, etc) without care. The variant ( /bin/sh -c "exec 2>&3; command" & ) 3>&2 2>/dev/null works better. It says, ^^^^ Run the thing in ( ) with file descriptor 3 open in addition to the standard 0, 1 and 2 (2 is standard error, used for messages). Make file descriptor 3 be the same as descriptor 2. Having done that, send everything written ^^^^^^^^^^^ on file descriptor 2 (standard error) to /dev/null -- in other words, throw away all error messages. This will throw away the PID, which is what we want, but will also throw away any error messages generated by "command". The exec 2>&3; tells the /bin/sh _inside_ the ( ) to make file descriptor 2 be the same as file descriptor 3, which we previously opened as the original standard error. So this restores standard error messages for the command inside the quotes. Which is what we need. Well, you might say that it would be less arcane to include the C program `timeout' given by Tom Christiansen, and to compile it on the fly, but in practice the commands are likely (I hope) to be simple, and the first form with /bin/sh -c "command" will probably work fine. Lee -- Liam R. E. Quin, lee@sq.com, {utai,utzoo}!sq!lee, SoftQuad Inc., Toronto ----------------------------- From: "Jay A. Konigsberg" <jak@sactoh0.uucp> Subject: Re: Timeout on shell command. Date: 16 Aug 90 02:12:09 GMT To: info-unix@sem.brl.mil In article <1990Aug12.221658.27776@uncle.uucp> donlash@uncle.UUCP (Donald Lashomb) writes: >In article <BRISTER.90Aug10222433@westworld.decwrl.dec.com> brister@decwrl.dec.com (James Brister) writes: >>I'd like to have a shell script run a command, but if that command doesn't >>finish in X seconds, then the script should kill it, if the command >>finishes sooner then the script should immediately continue. Any ideas on ============================================================= >>how one could achieve this? > >I'd approach it like this- > >#!/bin/sh ># ># run the command in the background ># remember its process ID ># sleep for X seconds ># kill the background command --- note: if ># the background command is finished, then ># the kill will fail benignly. ># >command & >cmdpid=$! >sleep $X >kill $cmdpid > When I saw the original post, I almost answered with this type of solution. However, it lacks an important part of the request. If the command finishes early, execution will still wait for the sleep to complete. However, there just may be a way if the sleep is placed in its own file. # main program file SEC={number here} # set the number of seconds to wait command & # execute in background cmdpid = $! # save the PID sleepit $SEC $cmdpid & # sleep in background wait $cmdpid # wait for the process to complete or be killed # sleepit - sleep $1 sec and then kill -9 $2 sleep $1 kill -9 $2 2>/dev/null #don't want those nasty error messages. My thanks to Donald Lashomb's post. Without it, I wouldn't have come up with this solution. -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, its worth doing correctly. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: redirecting standard i/o from an exec'ed programme Keywords: popen, io, exec, system Date: 15 Aug 90 13:29:21 GMT To: info-unix@sem.brl.mil In article <377@fe2o3.UUCP> michael@fe2o3.UUCP (Michael Katzmann) writes: >which execs the command a la "system()" and creates a pipe. "type" and be >"r" if you want to read from the standard output of "command", or "w" if >you want to write to standard input. However there doesn't seem to be any >way to use this routine to do both similtaneously. >What is the usual way to to this? This should probably be added the the FAQ list. The problem with trying to pipe both input and output to an arbitrary slave process is that deadlock can occur, if both processes are waiting for not-yet-generated input at the same time. Deadlock can be avoided only by having BOTH sides follow a strict deadlock-free protocol, but since that requires cooperation from the processes it is inappropriate for a popen()-like library function. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: directory reading Date: 15 Aug 90 13:31:24 GMT To: info-unix@sem.brl.mil In article <BGLENDEN.90Aug14202150@mandrill.cv.nrao.edu> bglenden@mandrill.cv.nrao.edu (Brian Glendenning) writes: > if (dp->d_ino == 0) > continue; >It looks like modern readdir(3)'s only return pointers to valid entries, >and NULL at the end, so a test of this type is no longer required. Yes, all versions of readdir() are expected to filter out "deleted" entries so there is no need to test for that in the application. ----------------------------- From: Chris Torek <chris@mimsy.umd.edu> Subject: Re: 'foo bar' <- What's the meaning of? Date: 15 Aug 90 13:55:44 GMT To: info-unix@sem.brl.mil Please, before asking about `foo', read the introduction to the net and ask locally. It always creates a stream of interminable partial, wrong, or otherwise not-quite-perfect answers which then cause further followups like this one. The word `foo' has been around for a long time. It appeared in old `Smokey Stover' cartoons in the 1920s and/or 30s (often on a license plate or other out-of-the-way place). The connection between `foo', `bar', and `foobar' and `fubar' is obvious; the connection between this foo and the one in the cartoons is less so. In WWII the armed forces came up with a whole series of acronyms, including FUBAR, SNAFU, and JANFU (F-ed Up Beyond All Recognition; Situation Normal---All F-ed Up; Joint Army-Navy F-Up). In the 1970s engineers at DEC designed the `Star' (the VAX-11/780) and snuck a `FUBAR' register into the Unibus adapter. In the 1950s and early 1960s the TMRC (Tech Model Railroad Club) at MIT made much use of many `nonsense words' which eventually became `hacker's jargon'. For details, see _The_Hacker's_Dictionary_ by Guy L. Steel Jr. You will find some of the above and a great deal more (e.g., the distinction between frob and tweak). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750) ----------------------------- From: Irving Wolfe <irv@happym.wa.com> Subject: Re: -F option for awk Keywords: awk field-separator Date: 15 Aug 90 13:57:33 GMT To: info-unix@sem.brl.mil In <491@llnl.LLNL.GOV> rjshaw@ramius.ocf.llnl.gov (Robert Shaw) writes: >print; or print $0; don't do the right thing because the lines come >out with spaces as the field separators instead of the character given >to the -F option. If you change any field, $1 to $NF, then print or print $0 re-composes $0 from all the individual fields, stringing them together with the output separator OFS which defaults to space unless you change it. If you don't touch any fields, awk should just print the originally input $0. Thus awk -F: '/^i/' /etc/passwd (here) produces irv:-------------:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh and awk '/^i/' /etc/passwd produces irv:-------------:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh exactly the same thing. Both print the /etc/passwd lines that begin with i exactly as is. But awk -F: '/^i/ {$2 = "hoho"; print}' /etc/passwd produces: irv hoho 101 1 0000-Irving Wolfe(0000) /u/irv /bin/gsh It will replace all the :s with spaces. You need awk -F: 'BEGIN {OFS = FS} /^i/ {$2 = "hoho"; print}' /etc/passwd which produces irv:hoho:101:1:0000-Irving Wolfe(0000):/u/irv:/bin/gsh -- Irving Wolfe Happy Man Corp. irv@happym.wa.com 206/463-9399 ext.101 4410 SW Point Robinson Road, Vashon Island, WA 98070-7399 fax ext.116 SOLID VALUE, the investment letter for Benj. Graham's intelligent investors Information free (sample $10 check or credit card): email patty@happym.wa.com ----------------------------- From: jian@kuhub.cc.ukans.edu Subject: More questions about how to issue a C-SHELL command within a C program Date: 15 Aug 90 14:09:17 GMT To: info-unix@sem.brl.mil Yesterday I asked for help about how to issue a C-SHELL command within a C program. I was lucky: serveral people came up with immediate answers. I very much appreciate those answers. According to the answers and what I read from the menu, system() and execlp() should work without any doubts. However, I can't make it. What I want to do is to issue a csh command to change terminal type within a C program. I did try: system("csh -cf \"setenv TERM adm3a"); and system("/bin/csh -c 'setenv TERM adm3a"); and execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); There was not any runtime errors if I embeded one of above statements into my C program. But none of them can change the terminal type. I don't know why. Would someone point me another way to change terminal type within a C program or give me some hints what I did wrong. I would appreciate any helps. Jian Q. Li jian@kuhub.cc.ukans.edu ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 15 Aug 90 22:15:04 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub writes: | Yesterday I asked for help about how to issue a C-SHELL command within a C | program. I was lucky: serveral people came up with immediate answers. I very | much appreciate those answers. | | According to the answers and what I read from the menu, system() and execlp() | should work without any doubts. However, I can't make it. What I want to do | is to issue a csh command to change terminal type within a C program. I did | try: | system("csh -cf \"setenv TERM adm3a"); | and | system("/bin/csh -c 'setenv TERM adm3a"); | | and | execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); | | There was not any runtime errors if I embeded one of above statements into my | C program. But none of them can change the terminal type. I don't know why. | Would someone point me another way to change terminal type within a C program | or give me some hints what I did wrong. I would appreciate any helps. Aha. As I said in my private mail, *why* would you want to execute a csh command? Now I can see. The short answer: You *cannot* change an environment variable (such as TERM) from a child process. The shell provides a *copy* of its environment to the children processes (such as your C program), so changes to that copy (or in your case, using a further csh which has its *own* copy), will not affect the parent shell. This is by design, so don't ask "Well, are they going to fix this some day?" The longer answer: If you invoke a program from the shell in such a way that the shell is going to expect an answer back and take action on that, you can get away with it. For example, if your program "pickterm" is invoked from the csh as: setenv TERM `pickterm` then all "pickterm" has to do is output the desired term-type on stdout. If you need interaction, you may need to arrange for the csh to get it from a file. For example, pickterm /tmp/$$ && setenv TERM `cat /tmp/$$` rm /tmp/$$ in which case pickterm would open /tmp/$$ for output, put the desired termtype into it after interacting with the user, and then exit successfully. Either of these solutions could be wrapped up inside an alias to prevent the nitty gritties from being exposed to the poor user. Just another Unix hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 04:48:55 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <1990Aug15.221504.348@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub writes: [ Stuff deleted ] >| execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); >| >| There was not any runtime errors if I embeded one of above statements into my >| C program. But none of them can change the terminal type. I don't know why. >| Would someone point me another way to change terminal type within a C program >| or give me some hints what I did wrong. I would appreciate any helps. >The short answer: >You *cannot* change an environment variable (such as TERM) from a >child process. The shell provides a *copy* of its environment to the >children processes (such as your C program), so changes to that copy >(or in your case, using a further csh which has its *own* copy), will >not affect the parent shell. This is by design, so don't ask "Well, >are they going to fix this some day?" Why not just use the putenv system call with something akin to: putenv("TERM=adm3a"); /* notify subprocess that it is an adm3a terminal */ -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: rjshaw@ramius.llnl.gov Subject: login shell suspend Date: 15 Aug 90 16:29:18 GMT Sender: usenet@llnl.llnl.gov To: info-unix@sem.brl.mil Hi. Who knows the history behind "Can't suspend a login shell (yet)." Is there a day when we will be able to do so, or is the "yet" a joke that I don't understand? When I rlogin somewhere and <RET> ~ CNTL-Z <RET> isn't that a suspension of the login shell on the remote machine? Isn't suspension just sleeping? No, I haven't read either of the internals books yet, but I'm planning to get to the Berkeley one any day now [ half :-) half :-( ] Thanx in advance for responses =============================================================================== rjshaw@ramius.llnl.gov _____ ____ ____ ______ R o b / / / / / / / / / / / -------- / --/ / / / / / / / / / --------------------------- /-- / / / / / / / / S h a w /____/ /_/_/ /_/_/ /_____/ The Cosby's are precisely what's wrong with television today... =============================================================================== ----------------------------- From: Robert Hartman <hartman@ide.com> Subject: Re: directory "indexer" Keywords: search,directory,index Date: 15 Aug 90 16:42:40 GMT Sender: Bert Beaton <bert@ide.com> To: info-unix@sem.brl.mil In article <335@nih-csl.nih.gov> tpersky@alw.nih.gov (Ted Persky) writes: >It has come to my attention that our staff on the whole spends >a great deal of time during the day searching for that one >certain file in a large directory tree. For example, try finding >a certain fragment of source code in the X11 distribution. >The people in our lab always seem to be asking each other >to help them locate the path name for "foo.c". If you have the BSD version of find, you can use the "fast-find" feature to build the database you want. This wasn't documented very well in the BSD man page. However, if you can get at a copy of a Sun 4.x man page, it's documented there. -r ----------------------------- From: Chet Ramey <chet@cwns1.cwru.edu> Subject: Re: Compiling GNU Bourne Again SHell (bash) on SUN OS Date: 15 Aug 90 18:15:54 GMT Sender: news@usenet.ins.cwru.edu Followup-To: gnu.bash.bug To: info-unix@sem.brl.mil In article <24173@adm.BRL.MIL> hsw@sparta.com (Howard Weiss) writes: $ I've got a copy of the Bourne Again SHell (bash) - version 1.05 that $ On the SUN, the make file says that its compiling for a SUN 3 running $ OS 4, but has problems with the bash-Makefile (fixed by commenting out $ the offending lines which are setting up stuff to build backup files) and $ then has problems with compiling y.tab.c (which is the result of running $ yacc on parse.y). I have already gotten and included all the latest $ patches for this version and have sent off a message to bug-bash but $ have not heard anything. $ $ Has anyone had this problem and/or does anyone know of a fix. I'm not $ versed in yacc (and don't really want to be). The yacc problem is solved by changing the lines in parse.y that read if (interactive) YYACCEPT; else YYABORT; to read if (interactive) { YYACCEPT; } else { YYABORT; } YYACCEPT and YYABORT became compound statements in SunOS 4.1 yacc. You will also need to use the SunOS malloc, because of the `localtime' bug (take USE_GNU_MALLOC out of the appropriate section in machines.h). There are a number of problems with bash 1.05. All have been fixed for the next release (whenever that is). Chet -- Chet Ramey ``Levi Stubbs' tears run down Network Services Group his face...'' Case Western Reserve University chet@ins.CWRU.Edu ----------------------------- From: Ambarish Malpani <ambarish@gandhi.uucp> Subject: Re: How to issue a C SHELL command within a C program Date: 15 Aug 90 18:23:15 GMT To: info-unix@sem.brl.mil In article <25279.26c7fd35@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: >How can I issue a statment that executes a C SHELL command within a C program? >I would appreciate any helps. > >Jian Q. Li >jian@kuhub.cc.ukans.edu Try using the system() library routine eg. system("pwd"); Ambarish sun!valid!ambarish ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: How to issue a C SHELL command with Date: 15 Aug 90 20:28:08 GMT To: info-unix@sem.brl.mil >> How can I issue a statment that executes a C SHELL command within a C program? >> I would appreciate any helps. > >You can use the "system" call. Use "man system" for more info. Well, sort of. In order to run a *C* shell command, as the original poster specified, rather than a *Bourne* shell command, as "system()" does on any valid implementation, you have to construct a Bourne shell command that runs the C shell, asking it to run a C shell command.... In general, I'd recommend replacing the C shell command in question with a Bourne shell command, if at all possible, and just using "system()". ----------------------------- From: Mark Harrison <harrison@necssd.nec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 15 Aug 90 18:36:10 GMT To: info-unix@sem.brl.mil In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc.wec.com (Frank P. Bresz) writes: > Where is Jon's addcol. I tried to write one a while back and kept > screwing it up. I would like to see a working version. Here is a simple one in awk. Replace $4 with your column number. awk '{ tot += $4} END{print tot}' ^^ If you put this into a shell script called addcol, you can say awk '{ tot += $'$1'} END{print tot}' and invoke it by addcol 4 Example: How many bytes in my files? ls -l c* | awk '{ tot += $4} END{print tot}' ls -l c* | addcol 4 Hope this helps! -- Mark Harrison harrison@necssd.NEC.COM (214)518-5050 {necntc, cs.utexas.edu}!necssd!harrison standard disclaimers apply... ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: Re: What's wrong with this Bourne shell script? Date: 16 Aug 90 04:54:19 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <1990Aug14.171056.17982@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <FPB.90Aug13191108@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: >| >or if you have Jon's addcol, even simpler: >| >| > stat -s * | addcol -2 >| >| Where is Jon's addcol. I tried to write one a while back and kept >| screwing it up. I would like to see a working version. >for addcol -1, try: > perl -ane '$s += $F[0]; print "$s\n" if eof;' >for addcol -2: > perl -ane '$s += $F[1]; print "$s\n" if eof;' >Others may be derived by noticing the pattern. :-) >Just another Perl hacker, That would be fine if I had or wanted pearl. I was under the impression that Jon's addcol was an awk script (I think that's where the original thread came from anway) in which the -# was the column you wanted to add and it would magically add up the numbers in column 1 or 7 or whatever column you wanted under argumentalized control instead of having separate scripts for each possible set of columns you want to add. -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Chuck Brown <univac@pirates.uucp> Subject: New UNIX Network Questions Keywords: sequent unisys banyan government Date: 15 Aug 90 18:59:30 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil We (City of Savannah) are in the first phases of a conversion from a Unisys 1100/90 mainframe environement to a UNIX environment. Our network will (if current plans hold out) consist of a reasonably large UNIX box (Sequent / Unisys), an inter-building fiber backbone, and 6 Banyan servers with 400-600 nodes, all 386sx/VGA systems. The applications on the UNIX system will all be accounting based. The Banyan applications will be Word Processing, e-mail, spreadsheet, general office productivity) The UNIX applications will be primarily Informix based. Several questions have come up, and we would appreciate any information, comments, or critisims. - What would be the reason for selection of Unisys over Sequent, if any, since the box is physically the same? (U6000/80, 10 processors, 128 meg, 9 gig of mass storage). - Banyan claims that this type of arrangement will be difficult to manage with Novell, Novell claims otherwise. Opinions? - Applications we are looking for for this and other areas include: Municiple (fund) accounting Police/Fire Computer Aided Dispatch Parking Citations Utility Billing Vehicle Maintenance All comments welcome! Thanks in advance. ============================================================================== Chuck Brown City Of Savannah Systems Programmer 133 Montgomery St. Voice: (912) 944-4793 Room 507 uunet\!pirates\!univac Savannah, GA 31402 ============================================================================== ----------------------------- From: Klaus Moeller <moeller@uniol.uucp> Subject: MACH stripped from AT&T code ? Date: 15 Aug 90 19:58:40 GMT To: info-unix@sem.brl.mil Hi It was said somewhere( I don't know where) that the MACH Kernel contains no AT&T code anymore. Is this right or has somebody made a joke or is this planned for the future? As far as I know, MACH still contains BSD code and BSD contains AT&T code. Has the AT&T code been removed from MACH or is it still in the system via the BSD code ? Thanks Klaus -- / Klaus Moeller, Leiteweg 2, 2940 Wilhelmshaven, West - Germany \ < moeller@uniol.uucp 078326@DOLUNI1.BITNET > \ Fill what's empty, empty what's full and scratch where it itches / ----------------------------- From: Jeff MacDonald <jmacdon@cg-atla.agfa.com> Subject: recursive variable substitution in csh Date: 15 Aug 90 21:49:37 GMT To: info-unix@sem.brl.mil In the C-shell, how does one evaluate a variable which contains the name of a variable in order to get the value of the variable contained by the variable that one is evaluating? To wit: set x = 'ABC' set y = '$x' set z = # some function of y such that $z == "ABC" Don't ask how I got into this predicament, it's not funny! -- Jeff MacDonald ([decvax|samsung|ima|ulowell]!cg-atla!jmacdon) Agfa/Compugraphic Division 200-2-9F (jmacdon@cg-atla.agfa.com) 200 Ballardvale, Wilmington MA 01887 (508) 658-0200, extension 5406 Hi, Mom! ----------------------------- From: Atul Parulekar <atul@ncoast.org> Subject: getting the exit value of an exec'd program Date: 15 Aug 90 22:39:52 GMT To: info-unix@sem.brl.mil May be the answer is in the manual, but I have not been able to find it. My problem is that if I run a program using fork and execvp, how do I get the exit value of the exec'd program into the main program. ----------------------------- From: "BURNS,JIM" <gt0178a@prism.gatech.edu> Subject: Re: getting the exit value of an exec'd program Date: 16 Aug 90 04:25:11 GMT To: info-unix@sem.brl.mil in article <1990Aug15.223952.1175@NCoast.ORG>, atul@NCoast.ORG (Atul Parulekar) says: > May be the answer is in the manual, but I have not been able to find it. > My problem is that if I run a program using fork and execvp, how do I get > the exit value of the exec'd program into the main program. Exec doesn't return a status - it doesn't return at all. Use wait(2) in the parent program. Its man page describes the union wait status variable returned by wait(2) and its variants. (Exact return type also varies between wait() variants and diff. unices.) -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: Mike Van Pelt <mvp@hsv3.uucp> Subject: Wanted: login & getty source (non-AT&T) Date: 15 Aug 90 23:41:37 GMT To: info-unix@sem.brl.mil Is there a public domain and/or copylefted (i.e., GNU) version of the getty and login programs that do not require an AT&T source liscence? I would like to add some local security features here, and this would be very helpful. (We're running SunOS, which is BSD-derived.) Please email, and I will summarize any responses. -- Mike Van Pelt Headland Technology/Video 7 Use a pun, go to jail. ...ames!vsi1!v7fs1!mvp ----------------------------- From: "Jay A. Konigsberg" <jak@sactoh0.uucp> Subject: Re: Spy Programs?? Date: 16 Aug 90 01:46:26 GMT To: info-unix@sem.brl.mil In article <24123@adm.BRL.MIL> senetza@hg.uleth.ca (Leonard Senetza) writes: >I have a few 'hostile' users on my system here. I was wondering if anyone has >a 'spy' type of program that would allow me to watch/record/control other >users' sessions. I could possibly write one myself, but why re-invent the >wheel? > There are a few ways to do this. However, assuming you _are_ the administrator of the system, there is one reasonably easy way. Take the cables running to these hostile users terminals and splice into them. Assuming everyone (including yourself) is using the same type of terminal, you can then run the T from the splice to your terminal. To be on the safe side, you probably don't want to connect the "write" pin (2 or 3, I can never remember). Other options include re-writing the shell, taping into their history file and putting a `tee -a` into their .profile. Each method has varying levels of information available. One last option, available to anyone on a system, is to write a shell daemon that does periodic "ps -lfu u_name" (or similar) to check their processes and CPU activity. While this meathod doesn't show exactly what a user is doing, it does provide useful information to an administrator. -- ------------------------------------------------------------- Jay @ SAC-UNIX, Sacramento, Ca. UUCP=...pacbell!sactoh0!jak If something is worth doing, its worth doing correctly. ----------------------------- From: Rob Freyder <rob@lafayet.uucp> Subject: TeX and LaTeX Docs and man pages Date: 16 Aug 90 02:39:50 GMT To: info-unix@sem.brl.mil I have binaries for TeX and LaTeX for Xenix... but I need docs and man pages ... Can someone tell where I can get via anonymous uucp... or by email ?? Thanks. -- Rob Freyder Core Laboratories a division of ____ ____ ____ Western Atlas International Inc. \ \ / /\ / /\ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- \ \/ / \ / / \ Humans (318) 235-9431 \ / / \ / /\ \ Internet rob@lafayet.UUCP \/___/ \/___/ \___\ Bang ...!uunet!rouge!lafayet!rob ----------------------------- From: "M. Pinghua Young" <mpyoung@portia.stanford.edu> Subject: How does a C program know its input is being redirected? Keywords: input, stdin, redirect, pipe, C program Date: 16 Aug 90 05:00:13 GMT Sender: "M. Pinghua Young" <mpyoung@portia.stanford.edu> To: info-unix@sem.brl.mil I am writing a program that prompts users for various inputs. However, the user can also put the input in a file and pipe it to my program, or use input redirection "<". In this case I don't want the program to prompt anything. Can anyone tell me how to achieve that? Please send me e-mails. Thank! -- | M. Pinghua Young | Confucius Said: | | pinghua@suwatson.bitnet | "Life Begins at 30" | | mpyoung@portia.stanford.edu | But He Died At 29. | ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/20/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 17 Aug 90 06:26:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#119 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Fri, 17 Aug 90 06:10:11 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab01304; 17 Aug 90 5:57 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa01300; 17 Aug 90 5:45 EDT Date: Fri, 17 Aug 90 05:45:36 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#119 Message-ID: <9008170545.aa01300@SEM.BRL.MIL> INFO-UNIX Digest Fri, 17 Aug 1990 V10#119 Today's Topics: Re: Recursion without -R Re: need help with FATAL error in unix 3.2u Coherent info Re: Coherent info Sys V or BSD for PDP 11/73 Wanted Re: More questions about how to issue a C-SHELL command within a C program Re: What's wrong with this Bourne shell script? Re: Cshell question: taking wordlists as a single string Re: Timeout on shell command. Printing with terminalservers Re: getting the exit value of an exec'd program Help on tools like SCCS, SPRs etc.. extracting files from a tar file Re: Cshell question. Or: How to make a fool of yourself Sending mail with explicit INTERNET address Re: Spy Programs?? Looking for a BCD library for Unix / C /-happy Re: /-happy Re: redirecting standard i/o from an exec'ed programme Unix supporting HANGUL (Korean) avail? Re: help sought - securing a terminal/line LaserWriter II printcap entry needed Looking for an adduser script. Changing back slashes to forward slashes Re: Changing back slashes to forward slashes addcol - # [Was: Re: What's wrong with this Bourne shell script?] Re: Converting to uppercase/lowercase in sed Re: MACH stripped from AT&T code ? sort with a tab as separator ----------------------------------------------------------------- From: micah altman <micah@sgi.com> Subject: Re: Recursion without -R Date: 15 Aug 90 17:53:22 GMT Sender: Net News <news@odin.corp.sgi.com> To: info-unix@sem.brl.mil In article <KAUL.90Aug14205729@icarus.eng.ohio-state.edu> kaul@icarus.eng.ohio-state.edu (Rich Kaul) writes: >In article <13595@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: > find . -print | xargs chown foo > > Of course, this only works if you have xargs, which is from System V and > is also available on SunOS in their System V software installation option. ... > If your version of find supports the -exec option you could recursively step through files and change the owner to "foo" by issueing the command find . -exec chown foo {} \; ( And yes, the "\;" at the end is necessary ) - Micah Altman Computational Juggler ----------------------------- From: "Dik T. Winter" <dik@cwi.nl> Subject: Re: Recursion without -R Date: 16 Aug 90 10:43:13 GMT Sender: news@cwi.nl To: info-unix@sem.brl.mil In article <1990Aug15.175322.23868@odin.corp.sgi.com> micah@sgi.com (micah altman) writes: > find . -exec chown foo {} \; > And do this only if user foo is in the local password file, not if foo is known through yellow pages. -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl ----------------------------- From: "Andrew A. Burgess" <aab@cichlid.com> Subject: Re: need help with FATAL error in unix 3.2u Keywords: parity error, NMI, floppy access, gateway2000 Date: 15 Aug 90 19:34:16 GMT To: info-unix@sem.brl.mil In article <601@bigbroth.UUCP> rk@bigbroth.UUCP (rohan kelley) writes: >Problems with unix 3.2u BellTech (Interactive) installation in >Gateway2000-25 cache system. > >Error message: >FATAL:Parity error on the motherboard >PANIC:Parity error address unknown > Trying to dump 1024 pages (etc) ... >Crash occurs when accessing the floppy drive (either 0 or 1) but only >at intermittent times. Commands current have been cpio and format. If ... I had a similar problem with an old AMI motherboard once. I first noticed that it would drop about one byte per million when reading from the tape drive. Repeating the read was successful. Note that there were no error messages from the tape drive -- it thought the tape had read correctly. I only became aware of a problem when doing a compare of disk to tape after a backup. Then I noticed that reading floppys had a similar problem. The only common denominator I could think of was that both subsystems used the motherboard DMA controller to transfer data. So I created a little test under DOS. I made a 500Kb file of random data and put two copies on a 1.2MB floppy. I then ran the DOS comp (file compare) program endlessly. The files would miscompare in a few minutes. Eventually the program would crash. My guess was that this one bye in a million was not just vanishing but instead being written to a 'random' location. This could be your problem. If so then a replacement motherboard would solve it (assuming you have a marginal component somewhere rather than a bad motherboard design). If the dealer is willing to swap and maybe give you another week or so to test, you might get lucky. Then again this is a WILD GUESS! You might also try writing a test program like mine. Good luck Andy -- Andy Burgess Independent Consultant uunet!silma!cichlid!aab aab@cichlid.com ----------------------------- From: Greg Montgomery <greg@turbo.atl.ga.us> Subject: Coherent info Date: 15 Aug 90 21:59:00 GMT To: info-unix@sem.brl.mil I'm looking for some info and opinions on Coherent from any users of it... I've talked to a tech at MW, and it sounds good, and a 386 version and DOS emulation is under development, so I've been considering getting it, but would like some opinions.. Please email any replies. Thanks... Greg ---- Greg Montgomery Internet: greg@turbo.atl.ga.us UUCP (smart): greg@turbo.UUCP UUCP (route): {rutgers,ogcise,gatech}!emory!turbo!greg ----------------------------- From: TURNER KENNETH WADE <turnerk@snoopy.colorado.edu> Subject: Re: Coherent info Date: 17 Aug 90 00:06:01 GMT Sender: news@boulder.colorado.edu To: info-unix@sem.brl.mil In article <2kTyN1w162w@turbo.atl.ga.us> greg@turbo.atl.ga.us (Greg Montgomery) writes: >I'm looking for some info and opinions on Coherent from any users of >it... I've talked to a tech at MW, and it sounds good, and a 386 version >and DOS emulation is under development, so I've been considering getting >it, but would like some opinions.. Hope this helps. Wade Turner ----------------------------- From: "Jay A. Snyder" <jay@gdx.uucp> Subject: Sys V or BSD for PDP 11/73 Wanted Date: 16 Aug 90 02:16:37 GMT To: info-unix@sem.brl.mil Does any one out there no where to get a copy of SYSV or BSD, or any version of unix newer than V7 for a DEC LSI 11/73 based system? echo wrong group flames >/dev/null -- ============================================================================== Jay A. Snyder "Let Me Up! I've had enough" wa3wbu!gdx!jay@uunet.uu.net uunet!wa3wbu!gdx!jay ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 07:34:52 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug16004855@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | Why not just use the putenv system call with something akin to: | | putenv("TERM=adm3a"); /* notify subprocess that it is an adm3a terminal */ Nope. That changes the *current* process (the C program), not the parent process (the parent shell). You *must* involve the parent process if you want programs invoked after the C program to see the change (unless you intend the C program to perform all the future invocations... yuck). Just another UNIX hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 14:22:10 GMT To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: > system("/bin/csh -c 'setenv TERM adm3a"); (You're missing a quote ') >But none of them can change the terminal type. I don't know why. Your problem is that no change made to the environment variables of a subprocess can affect the environment variables of an ancestor process. This is why most of us make sure our TERM environment variable is properly set up by a file that is SOURCED, not executed in a subprocess, when our shell starts up (e.g. .profile or .login). ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 19:22:26 GMT To: info-unix@sem.brl.mil >Would someone point me another way to change terminal type within a C program >or give me some hints what I did wrong. I would appreciate any helps. As noted, the environment isn't "global", so setting an environment variable such as TERM in one process won't affect its value in any other existing processes; it'll only affect its initial value in processes forked from that process. If you want to change the value of an environment variable in a process running some arbitrary C program, check whether your system has the "putenv" routine (look for PUTENV(3) in the manual - unless you have some SCO system wherein they "improved" the manuals by changing the names of the sections, in which case I've no idea what the name would be). If not, see whether it has the "setenv" routine. If it has one or the other of those routines, the manual page should show you how to set an environment variable using the routine. Why do you need to change the setting of TERM within a program? The ultimate problem may lie deeper. (Also bear in mind that you should set TERM *before* you call *any* "curses" or "termcap" routines; otherwise, "curses" or "termcap" will start out using the old value of TERM, not the new value.) ----------------------------- From: Peter da Silva <peter@ficc.ferranti.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 19:43:41 GMT To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub.cc.ukans.edu writes: > execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); You can't set your environment from a subshell. An environment is owned by a process and inherited by its children, but never passed back. You need to do something like print the commands on standard output, the way "tset" does: 47 % tset -s set noglob; setenv TERM at/386 console ; unset noglob; 48 % grep tset .login tset -s ... >/tmp/tset$$ source /tmp/tset$$ rm /tmp/tset$$ 49 % This way the variables get set in the parent shell and so stick around after the subshell or your C program (which is also a child of the shell) exits. If you just want to set variables for programs you call, try "putenv". -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com (currently not working) peter@hackercorp.com ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: What's wrong with this Bourne shell script? Date: 16 Aug 90 07:37:29 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug16005419@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | That would be fine if I had or wanted pearl. I was under the | impression that Jon's addcol was an awk script (I think that's where the | original thread came from anway) in which the -# was the column you wanted | to add and it would magically add up the numbers in column 1 or 7 or | whatever column you wanted under argumentalized control instead of having | separate scripts for each possible set of columns you want to add. Well, the script in awk is almost as easy: ... | awk '{ $x += $3 } END { print $x }' | who needs anything else? (But in Perl you can write it in one line. :-) Just another Perl hacker, more-or-less, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 13:00:47 GMT To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk>, I wrote: > > Basically, then, can Cshell cope with word-lists as single arguments, or > must I write a C program to do the job (or try sh or ksh?) > The solution was staring me in the face and I didn't see it until Jay Plett sent me this solution: % xxx "a b c" d e f a b c d e f % cat xxx #! /bin/csh -f while ( $#argv ) echo $1 shift end So you must use a while loop rather than a foreach loop. So obvious now I look at it. *sigh* Thanks to Jay for the enlightenment. -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Brad Appleton <brad@ssd.csd.harris.com> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 15:26:41 GMT Sender: news@travis.csd.harris.com To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk> andy@syma.sussex.ac.uk (Andy Clews) writes: In article <3251@syma.sussex.ac.uk> you write: > The difficulty arises because I want to do (for example) > > whatnews "bug reports" > >where the intended effect is to search out all lines containing the >string "bug reports". At the moment it splits this up into "bug" and >"reports" and does two searches. This is because the script contains a > foreach i ($*) >loop for repeated searches. Quoting (single or double) doesn't help. Dont use "$*" in this case, use $argv and a while loop! The following should work in the manner you desire: @ i=1 while ( $i <= $#argv ) cmd "$argv[$i]" ##dont forget those quotes! . . . @ i++ end Im sure there are other solutions too (probably better ones) but this works (on my machone anyway) and should be easy to understand. Any other solutions out there? hope this helps! ______________________ "And miles to go before I sleep." ______________________ Brad Appleton brad@travis.ssd.csd.harris.com Harris Computer Systems ...!uunet!hcx1!brad Fort Lauderdale, FL USA ~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~ ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Timeout on shell command. Date: 16 Aug 90 14:13:25 GMT Sender: news@cs.vu.nl Followup-To: comp.unix.questions,alt.sources.d To: info-unix@sem.brl.mil In article <3716@sactoh0.UUCP>, jak@sactoh0.UUCP (Jay A. Konigsberg) writes: )... )command & # execute in background What if the command is supposed to run in the _foreground_? The following timeout shell script can be easily converted to a C program if desired. --------------------cut here-------------------- #!/bin/sh # @(#)timeout 6.2 90/03/01 Maarten Litmaath prog=`basename $0` usage="Usage: $prog [-signal] [timeout] [:interval] [+delay] [--] <command>" SIG=-KILL # default signal sent to the process when the timer expires, # unless a delay option has been given: then it is -TERM sigopt=0 timeout=60 # default timeout interval=15 # default interval between checks if the process is still alive delay= # (if specified) the delay between posting the given signal and # destroying the process (kill -KILL) while : do case $1 in --) shift break ;; -*) SIG=$1 sigopt=1 ;; [0-9]*) timeout=$1 ;; :*) EXPR='..\(.*\)' interval=`expr x"$1" : "$EXPR"` ;; +*) EXPR='..\(.*\)' delay=`expr x"$1" : "$EXPR"` case $sigopt in 0) SIG=-TERM esac ;; *) break esac shift done case $# in 0) echo "$usage" >&2 exit 2 esac ( for t in $timeout $delay do while test $t -gt $interval do sleep $interval kill -0 $$ || exit t=`expr $t - $interval` done sleep $t kill $SIG $$ && kill -0 $$ || exit SIG=-KILL done ) 2> /dev/null & exec "$@" -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Klaus Harbo <harbo@diku.dk> Subject: Printing with terminalservers Keywords: print terminalserver Date: 16 Aug 90 14:30:07 GMT To: info-unix@sem.brl.mil I want to be able to hook up printers on terminalservers, so that we can place our printers anywhere in the house. We use Ultrix on DECStations version 3.1. Our terminalservers are Bridge CS200. As far as I understand you can assign one of the physical ports on the terminalserver to have a separate IP address. What's needed then, is some kind of software that will send open a (TCP?) connection to that IP address, and send the print job to that port. Does anyone know of such software, and will the solution I suggest do the job? I do not know a lot about terminalservers, but I suppose it contains the software needed to handle TCP connections, directing the output to the physical port on the terminalserver assigned to the printer. Thanks in advance. -Klaus |--------------------------------------------------------------------------| | Klaus Harbo | | | Euromath Center | e-mail: harbo@euromath.dk | | Universitetsparken 5 | phone: +45 3135 3133 ext. 417 | | DK-2100 Copenhagen | fax: +45 3135 0427 | |--------------------------------------------------------------------------| -- |--------------------------------------------------------------------------| | Klaus Harbo | | | Euromath Center | e-mail: harbo@euromath.dk | ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: getting the exit value of an exec'd program Date: 16 Aug 90 14:40:38 GMT To: info-unix@sem.brl.mil In article <1990Aug15.223952.1175@NCoast.ORG> atul@NCoast.ORG (Atul Parulekar) writes: >May be the answer is in the manual, but I have not been able to find it. >My problem is that if I run a program using fork and execvp, how do I get >the exit value of the exec'd program into the main program. Via wait(). The general procedure for running a subprocess is, in outline: switch ( (pid = fork()) ) { case -1: Punt( "unable to fork" ); /*NOTREACHED*/ case 0: /* child */ args[0] = "command"; execvp( args[0], args ); /* WARNING: uses $PATH */ _exit( 127 ); /*NOTREACHED*/ default: /* parent */ while ( (w = wait( &status )) != pid ) if ( w == -1 && errno != EINTR ) break; if ( w == -1 ) { Punt( "child disappeared" ); /*NOTREACHED*/ } else if ( (status & 0xFF) != 0 ) { /* (status & 0x7F) is the signal number */ /* (status & 0x80) != 0 iff core dumped */ Punt( "child terminated abnormally" ); /*NOTREACHED*/ } else status = status >> 8 & 0xFF; /* exit status */ } ----------------------------- From: 35G-PATEL <vsp@hjuxa> Subject: Help on tools like SCCS, SPRs etc.. Date: 16 Aug 90 14:48:33 GMT To: info-unix@sem.brl.mil We are in planning phase for a year long system software dvl project. We are working on a UNIX system. We are planning to use SCCS for source control. 1) Is there any other software that is like/better than SCCS? (preferably from public domain) 2) Software to manage MRs (modification requests) and QARs (Quality Assurance Report) to track bug fixes during development/field test? 3) Package that can combine both of these features to keep software in sync with any updates from QARs etc. 4) Are there any other groups for these questions? You may mail me directly. I will post the results sometime in the future. Thankx. vsp@unx.dec.com -- ============================================================================= ___ ___ ___ ___ ___ ___ ___ Vipul Patel ----------------------------- From: Bob Fyfe <fyfe@bgsuvax.uucp> Subject: extracting files from a tar file Keywords: tar Date: 16 Aug 90 15:05:39 GMT To: info-unix@sem.brl.mil I have a faculty member who has brought a tape with him from a different site. It is a tar tape and the files were stored using absolute pathnames. The difficulty is that we don't have the same file structure names and so when I would try to restore the files, it fills up the root file structure quickly (we don't keep a whole lot of space available in that partition). I was wondering if there are any PD programs that exist or whether someone has written a script to get around this problem. I could write a script to extract a file at a time and then move it but its a hassle trying to maintain the directory structure that the faculty member has and preserve modification dates. I've also considered writing a C program using the chroot function and doing a system call to tar but that seems messy too. Is there anything out there available or am I missing something in my own backyard? Any help would be appreciated. You can direct email any solutions to me. Bob Fyfe *************************************************************************** * Bob Fyfe / EMT-A/ Ham Radio KA8YWQ | INTERNET: fyfe@andy.bgsu.edu * * University Computer Services | BITNET: fyfe@bgsuopie * * Bowling Green State University (OH)| UUCP: ...!osu-cis!bgsuvax!fyfe * *************************************************************************** -- *************************************************************************** * Bob Fyfe / EMT-A/ Ham Radio KA8YWQ | INTERNET: fyfe@andy.bgsu.edu * * University Computer Services | BITNET: fyfe@bgsuopie * * Bowling Green State University (OH)| UUCP: ...!osu-cis!bgsuvax!fyfe * *************************************************************************** ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Re: Cshell question. Or: How to make a fool of yourself Date: 16 Aug 90 15:43:14 GMT To: info-unix@sem.brl.mil In article <3269@syma.sussex.ac.uk>, I stupidly wrote: > So you must use a while loop rather than a foreach loop. So obvious now > I look at it. *sigh* I am making a rather embarrassing fool of myself. Marten Litmaath very correctly pointed out that foreach i ($*:q) etc. will work just as well. *And* it's all in TFM. I apologise for wasting net bandwidth. I will now shut up. *SIGH* It's been one of them days.... -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Dan Mercer <mercer@npdiss1.stpaul.ncr.com> Subject: Sending mail with explicit INTERNET address Date: 16 Aug 90 16:10:15 GMT To: info-unix@sem.brl.mil I have accounts on two different systems tcp/ip'd together across an Ethernet backbone. Neither node is on the backbone, but the networks they are on are gated to the backbone. On my home system, where I have sysadmin privileges, the remote system is in my /etc/hosts file. On the remote system, where I'm a guest, my home system has not been put in their /etc/hosts file despite numerous requests. I can ftp and telnet from the remote to my home system by using explicit decimal dot addressing. My problem is, how do I mail stuff to myself by the same method? TIA -- Dan Mercer Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) "MAN - the only one word oxymoron in the English Language" ----------------------------- From: Isaac Rabinovitch <ergo@netcom.uucp> Subject: Re: Spy Programs?? Date: 16 Aug 90 16:57:53 GMT To: info-unix@sem.brl.mil In <3715@sactoh0.UUCP> jak@sactoh0.UUCP (Jay A. Konigsberg) writes: >In article <24123@adm.BRL.MIL> senetza@hg.uleth.ca (Leonard Senetza) writes: >>I have a few 'hostile' users on my system here. I was wondering if anyone has >>a 'spy' type of program that would allow me to watch/record/control other >>users' sessions. I could possibly write one myself, but why re-invent the >>wheel? >> >There are a few ways to do this. However, assuming you _are_ the >administrator of the system, there is one reasonably easy way. >Take the cables running to these hostile users terminals and splice into >them. Assuming everyone (including yourself) is using the same type of >terminal, you can then run the T from the splice to your terminal. To >be on the safe side, you probably don't want to connect the "write" pin >(2 or 3, I can never remember). A similar, and possibly more useful, approach would be to run the cable through a PC running one of those RS-232 diagnostic programs that captures data. Of course, you'd need a PC with two serial ports. Permanent records are always useful when legality time comes 'round. And if the bad guy isn't using your usual type of terminal, you can just save everything until you can figure out how his escape codes work. -- ergo@netcom.uucp Isaac Rabinovitch atina!pyramid!apple!netcom!ergo Silicon Valley, CA uunet!mimsy!ames!claris!netcom!ergo Disclaimer: I am what I am, and that's all what I am! ----------------------------- From: Stig Jacobsen <shj@login.dkuug.dk> Subject: Looking for a BCD library for Unix / C Keywords: BCD,library Date: 16 Aug 90 17:06:40 GMT Sender: news@slyrf.dkuug.dk Followup-To: comp.lang.c To: info-unix@sem.brl.mil Does anyone know of a BCD library for Unix? It doesn't matter whether it is commercial, free, whatever (I haven't seen any at all!). Please mail me any info that you have - thanks in advance. -- Stig Jacobsen shj@login.dkuug.dk fidonet 2:231/16.0 ----------------------------- From: John H Merritt <merritt@iris613.gsfc.nasa.gov> Subject: /-happy Date: 16 Aug 90 17:20:49 GMT Sender: news@dftsrv.gsfc.nasa.gov To: info-unix@sem.brl.mil Explain why '/////' is valid in the following statement: cd /./../tmp/////../././bin It is interesting that any permutation of '.', '..', '/' and directory names can be used with, at least, csh, sh, and tcsh to yield a valid path name. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ John H. Merritt # Yesterday I knew nothing, Applied Research Corporation # Today I know that. merritt@iris613.gsfc.nasa.gov # ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: /-happy Date: 16 Aug 90 21:50:45 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3139@dftsrv.gsfc.nasa.gov>, merritt@iris613 (John H Merritt) writes: | Explain why '/////' is valid in the following statement: | | cd /./../tmp/////../././bin | | It is interesting that any permutation of '.', '..', '/' and directory | names can be used with, at least, csh, sh, and tcsh to yield a valid | path name. The null pathname (look carefully between the consecutive "/"-s, and you'll see them there) is a valid synonym for the "current directory". So aaa////bbb is the same as aaa/././././bbb, except that you don't have to stat "." four additional times (it'd be fast, but it still takes time). Just another Unix hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "William (Bill" <mayne@vsserv.scri.fsu.edu> MMDF-Warning: Parse error in original version of preceding line at BRL.MIL Subject: Re: redirecting standard i/o from an exec'ed programme Keywords: popen, io, exec, system Date: 16 Aug 90 17:38:04 GMT Sender: news@sun13.scri.fsu.edu To: info-unix@sem.brl.mil In article <377@fe2o3.UUCP> michael@fe2o3.UUCP (Michael Katzmann) writes: > >I have a task that requires the ability to fork off another programme but >to supply it's standard input and output. The SysV manuals describe > > FILE *popen( command, type ) > char *command, *type; > >which execs the command a la "system()" and creates a pipe. "type" and be >"r" if you want to read from the standard output of "command", or "w" if >you want to write to standard input. However there doesn't seem to be any >way to use this routine to do both similtaneously. > >What is the usual way to to this? > >Important points: The exec'ed command must run asynchronously (obvious if > the parent is supplying input.) > > The child process id must be available to the parent. > (so that it can be killed if necessary) > > >Any ideas would be appreciated. > > >--------------------------------------------------------------------- >email to >UUCP: uunet!mimsy!{arinc,fe2o3}!vk2bea!michael > _ _ _ _ > Amateur | VK2BEA (Australia) ' ) ) ) / // > Radio | G4NYV (United Kingdom) / / / o _. /_ __. _ // > Stations| NV3Z (United States) / ' (_<_(__/ /_(_/|_</_</_ > >Michael Katzmann >Broadcast Sports Technology. >2135 Espey Ct. #4 >Crofton Md. 21114 USA > >Ph: +1 301 721 5151 Although, as a response on the net indicates, there can be problems connecting both stdin and stdout from a child if you aren't very careful about protocols there are cases where it is useful. As you have discovered popen() won't do it, though. I have waited to see if a detailed answer was provided by others. Since I haven't seen one I will post part of a program I wrote which does this. The key is that the child inherits stdin and stdout from the parent, so the parent changes his own stdin and stdout to pipes before spawning the child, using dup() to change file desciptors. The purpose of this program is to run all permutations of given string through the program used by the standard spell script looking for all the words which can be formed from the letters in the input, as when solving word puzzles such as "Jumbles" found in many newspapers. I have omitted the details and tried to leave everything necessary to (1) see how to do the i/o redirection you wanted to do and (2) see the whole structure of the process tree in which this was used in a realistic (or at least fun) application. The permutation generator created the list of permutations in sorted order since this was much faster than creating the whole list and then sorting, even if space permitted. It also actually generated two separate streams of permutations since that was actually more efficient than splitting one up and avoided possible deadlock problems. I hope the editting jobs leaves enough for you to see what is going on without getting lost in details. Incidentally I tried to email the whole thing but got "host not known". Can experienced netters suggest how I might be able to use the routing show at the top of a post to reply even when my local host doesn't know the final destination? /* anagram.c - extracted fragments to show redirection */ #include <string.h> #include <stdio.h> #ifndef SPELLPROG #define SPELLPROG "/usr/bin/spellout" #endif #ifndef DICT #define DICT "/usr/dict/hlista" #endif /* Omitting some irrelevant stuff here */ main(argc,argv,envp) int argc; char **argv, **envp; { int pipe1[1], pipe2[2]; char word[21]; int i; #define TOCHILD pipe1[1] #define FROMCHILD pipe2[0] #define TOPARENT pipe2[1] #define FROMPARENT pipe1[0] /* Stuff omitted */ pipe(pipe1); pipe(pipe2); if (fork()==0) { if (fork()==0) { /* Child to invoke spell program in a pipeline */ /* Close unused pipes */ close (TOCHILD); close (FROMCHILD); /* Change stdin and stdout to pipe */ close(0); dup(FROMPARENT); close(1); dup(TOPARENT); /* Invoke spell command */ execl(SPELLPROG,"spellout",DICT,(char *)0); /* No return to here. For completeness make parent terminate */ } else { /* Process to send distinct permutations to spelling checker */ /* Close unused pipes */ close(FROMCHILD); close(TOPARENT); close(FROMPARENT); /* Switch stdout to TOCHILD pipe */ close(1); dup(TOCHILD); /* Send all distinct permutations to spell child */ /* by writing them to stdout - details omitted */ } } else { /* Root process invokes permute() to display accepted permutations */ /* Close unused pipes */ close(TOCHILD); close(TOPARENT); close(FROMPARENT); /* Change stdin to pipe from speller */ close(0); dup(FROMCHILD); /* Generate permutations in sorted order; Read misspellings from pipe; Print everything not on misspell list; - details omitted */ } } ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: redirecting standard i/o from an exec'ed programme Date: 16 Aug 90 18:53:10 GMT Sender: news@cs.vu.nl To: info-unix@sem.brl.mil In article <410@sun13.scri.fsu.edu>, mayne@VSSERV.SCRI.FSU.EDU (William (Bill) Mayne) writes: )... ) /* Close unused pipes */ ) close (TOCHILD); ) close (FROMCHILD); ) /* Change stdin and stdout to pipe */ ) close(0); ) dup(FROMPARENT); close(FROMPARENT); /* !!! */ ) close(1); ) dup(TOPARENT); close(TOPARENT); /* !!! */ I've deleted the rest of the code, but there were still a few other places where calls to close() should be added. Always close every unused file descriptor (esp. when dealing with pipes), else you will get bitten one day; example scenario: - the child exits - the parent reads from the pipe to the child - the parent still has the write side of the pipe open - the read hangs... -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Russ Romero <rrome@atr-14.hac.com> Subject: Unix supporting HANGUL (Korean) avail? Date: 16 Aug 90 17:58:21 GMT Sender: news@hacgate.uucp To: info-unix@sem.brl.mil Looking for a version of UNIX from a COTS vendor which supports the Korean character set HANGUL. As I understand it (rather, think I understand it), this is a 27 letter set of phonetic characters, using a two byte code. Anyway, if you know about it, you know better what it is than I. Please e-mail (doubt there's widespread interest in this). Any clues accepted. THANKS rrome@1lkernel.hac.com ====================================================== Russ Romero ============================================ (brilliant opinions proprietary) ----------------------------- From: Peter Murray <pemurray@miavx1.acs.muohio.edu> Subject: Re: help sought - securing a terminal/line Date: 16 Aug 90 18:03:55 GMT To: info-unix@sem.brl.mil In article <1990Aug14.161816.3450@chinet.chi.il.us>, les@chinet.chi.il.us (Leslie Mikesell) writes: > Does anything support the now-ubiquituous devices that announce the connection > speed in ASCII before bringing up CD or does everyone still have to > write their own code for this if they don't want the users to have to > send something before getting the login prompt? I found the source code for AGETTY, an alternative getty for SYSV, at gatekeeper.dec.com (annonymous FTP) when I was working with this problem before. This program should do the trick for you, and it is (relatively) easy to port it to BSD, if you need to. Peter -- Peter Murray Neat UNIX Stunts #7: pemurray@miavx1.bitnet 215 Foxfire Dr #308 csh> %blow murrayp@apsvax.aps.muohio.edu Oxford, OH 45056 NeXT Mail: pmurray@next4.acs.muohio.edu ----------------------------- From: "Joe.Fernandez" <joe@robin.sandiego.ncr.com> Subject: Re: help sought - securing a terminal/line Date: 16 Aug 90 20:11:31 GMT Sender: news@iss-rb.sandiego.ncr.com To: info-unix@sem.brl.mil In article <=D25VBE@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: >In article <3846@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: >> For UNIX-like systems with "ttymon", such as System V Release 4, I think >> there's some other magic you can do to arrange that "ttymon" run your >> program when the port starts up. > >You're saying V.4 doesn't use inittab? > >Um, this is not good. The flexibility of inittab has been very helpful. I >don't want to go back to kludging a login or getty front-end again. inittab still exists in SVR4. ttymon is a STREAMS-based port monitor that detects connection requests on the tty ports. It replaces the getty processes. SVR4 now has one process doing the work that lots of getty processes had to do in in pre-SVR4. A connection request is when one non-break char followed by a new line char is received on the port. When ttymon detects the connection request it executes the service process that has been configured for that port. One example of a service process is our old friend the login process. But you can create your own specific service process. This is unlike pre-SVR4 where the only service process that can be invoked from getty is 'login'. inittab starts the ttymon and any other port monitors (e.g., listen) that may exist on the system. Users can develop their own port monitors. --Hope this helps ============================================================================ Joe Fernandez NCR Corporation, MS# 9140 (619) 485-2186 16550 W. Bernardo Dr. uunet!ncrlnk!ncr-sd!iss-rb!robin!joe San Diego, CA 92127 ----------------------------- From: Martin Brooks <mb33@prism.gatech.edu> Subject: LaserWriter II printcap entry needed Keywords: Sun4 Apple Date: 16 Aug 90 18:30:42 GMT To: info-unix@sem.brl.mil Does anyone have an /etc/printcap entry that would work with an Apple LaserWriter II connected to a Sun4/280 via serial port? If so, please send mail. Thanks in advance. -- Martin Brooks - Georgia Tech - Atlanta, Georgia, USA uucp: ...!gatech!prism!mb33 Internet: mb33@prism.gatech.edu ----------------------------- From: Jamie Gobble <jkg@juliet.cs.duke.edu> Subject: Looking for an adduser script. Date: 16 Aug 90 19:12:17 GMT Sender: news@duke.cs.duke.edu To: info-unix@sem.brl.mil Hi, Do any of you have an adduser script written perl or awk? If so, or if you know of another good approach, please drop me a line. Thanks, Jamie. p.s. Of course, I'll summarize and post if enough of you me to want. --- Jamie Gobble, sounds like "go-bull" Computational Neuroscience Lab Dept. of Neurobiology O_o -Ack! inet: jamie@neuro.duke.edu Duke Univ. Med. Ctr., Box 3209 =( )= bnet: GOBBL001@DUKEMC Durham, N.Carolina 27710, USA U Work (919) 684-5748 ----------------------------- From: Ramon F Herrera <ramon@skye.mit.edu> Subject: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 19:46:44 GMT Sender: Mr Background <daemon@athena.mit.edu> To: info-unix@sem.brl.mil I have a question for those {sed, grep, awk, tr} wizards out there. I'd like to change all the occurrences in a file of a line like this: #include "dira\dirb\incl.h" to #include "dira/dirb/incl.h" but only for the lines that begin with "#include". As you may have guessed, I am porting a PC-DOS program to Unix. thanks, Ramon -- Ramon F. Herrera Research Laboratory of Electronics Massachusetts Institute of Technology ramon@iona.mit.edu ----------------------------- From: Lee F Kolakowski <lfk@athena.mit.edu> Subject: Re: Changing back slashes to forward slashes Date: 16 Aug 90 20:33:32 GMT Sender: Mr Background <daemon@athena.mit.edu> To: info-unix@sem.brl.mil On Thu, 16 Aug 90 19:46:44 GMT, ramon@skye.mit.edu (Ramon F Herrera) said: > I have a question for those {sed, grep, awk, tr} wizards out there. > I'd like to change all the occurrences in a file of a line like this: > #include "dira\dirb\incl.h" > to > #include "dira/dirb/incl.h" > but only for the lines that begin with "#include". Try: awk ' { if ($0 ~ /^#include/) gsub(/\\/, "/") print }' filename Frank Kolakowski ====================================================================== |lfk@athena.mit.edu || Lee F. Kolakowski | |lfk@eastman2.mit.edu || M.I.T. | |kolakowski@wccf.mit.edu || Dept of Chemistry | |lfk@mbio.med.upenn.edu || Room 18-506 | |lfk@hx.lcs.mit.edu || 77 Massachusetts Ave.| |AT&T: 1-617-253-1866 || Cambridge, MA 02139 | |--------------------------------------------------------------------| | #include <woes.h> | | One-Liner Here! | ====================================================================== -- Frank Kolakowski ====================================================================== |lfk@athena.mit.edu || Lee F. Kolakowski | |lfk@eastman2.mit.edu || M.I.T. | |kolakowski@wccf.mit.edu || Dept of Chemistry | |lfk@mbio.med.upenn.edu || Room 18-506 | |lfk@hx.lcs.mit.edu || 77 Massachusetts Ave.| |AT&T: 1-617-253-1866 || Cambridge, MA 02139 | |--------------------------------------------------------------------| | #include <woes.h> | | One-Liner Here! | ====================================================================== ----------------------------- From: Rouben Rostamian <rouben@math13.math.umbc.edu> Subject: Re: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 20:57:51 GMT Sender: newspost@umbc3.umbc.edu To: info-unix@sem.brl.mil In article <1990Aug16.194644.14376@athena.mit.edu> ramon@skye.mit.edu (Ramon F Herrera) writes: | |I have a question for those {sed, grep, awk, tr} wizards out there. |I'd like to change all the occurrences in a file of a line like this: | |#include "dira\dirb\incl.h" | |to | |#include "dira/dirb/incl.h" | |but only for the lines that begin with "#include". | sed <infile -e '/\#include/s/\\/\//g' >outfile -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County rostamian@umbc.bitnet Baltimore, MD 21228, U.S.A. rostamian@umbc3.umbc.edu ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 21:53:18 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <1990Aug16.194644.14376@athena.mit.edu>, ramon@skye (Ramon F Herrera) writes: | | I have a question for those {sed, grep, awk, tr} wizards out there. | I'd like to change all the occurrences in a file of a line like this: | | #include "dira\dirb\incl.h" | | to | | #include "dira/dirb/incl.h" | | but only for the lines that begin with "#include". perl -pi~ -e 's#\\#/#g if /^#include/' file1.c file2.c file3.c ... Pretty darn simple with Perl. Even leaves you a backup. Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: addcol - # [Was: Re: What's wrong with this Bourne shell script?] Date: 16 Aug 90 20:19:19 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <416@necssd.NEC.COM> harrison@necssd.NEC.COM (Mark Harrison) writes: >Here is a simple one in awk. Replace $4 with your column number. > awk '{ tot += $4} END{print tot}' > ^^ >If you put this into a shell script called addcol, you can say > awk '{ tot += $'$1'} END{print tot}' >and invoke it by > addcol 4 >Example: How many bytes in my files? > ls -l c* | awk '{ tot += $4} END{print tot}' > ls -l c* | addcol 4 >Hope this helps! It is EXACTLY what I was looking for. Thank you very much for weeding through and figuring out what I really wanted.!! -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Converting to uppercase/lowercase in sed Date: 16 Aug 90 23:21:51 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3766@umbc3.UMBC.EDU>, rostamia@umbc5 writes: | Is there a way to convert characters to uppercase or to lowercase in sed? | In EX the command | s/asdf/\U&/ | changes the string asdf to ASDF, but ed and sed do not seem to be as | sophisticated as ex :-( | | Any ideas? yeah, the not very well documented "y" command. y/a-z/A-Z/ uppercases the pattern space. You'll have to juggle the pattern and hold spaces if you want just part of a line uppercased. Or get Perl. :-) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Melinda Shore <shore@mtxinu.com> Subject: Re: MACH stripped from AT&T code ? Date: 17 Aug 90 01:06:57 GMT To: info-unix@sem.brl.mil In article <3229@uniol.UUCP> moeller@uniol.UUCP (Klaus Moeller) writes: >It was said somewhere( I don't know where) that the MACH Kernel >contains no AT&T code anymore. This is a *very* common misconception. The current Mach kernel contains significant amounts of BSD code and requires an AT&T license. The 3.0 Mach kernel will be free of AT&T code, but how useful it will be to the average user without an environment, filesystem, device drivers, etc. (all would require licenses) is left as an exercise for the reader. -- Melinda Shore shore@mtxinu.com mt Xinu ..!uunet!mtxinu.com!shore ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: sort with a tab as separator Date: 17 Aug 90 01:21:42 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil How do I indicate to sort that my field-separation character is the tab (^I)? I know that there is a tab option (-t) in sort, but I don't know how to specify ^I ( or \t, for that matter).. No, the default is not this tab, but any whitespace character according to my documentation. Thanks for any help. /ivo welch ivo@next.agsm.ucla.edu ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/21/90)
----Reason for mail failure follows---- Sending mail to <math!ckaul@cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 17 Aug 90 06:37:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#119 To: "math!ckaul" <math!ckaul@cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Fri, 17 Aug 90 06:10:11 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab01304; 17 Aug 90 5:57 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa01300; 17 Aug 90 5:45 EDT Date: Fri, 17 Aug 90 05:45:36 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#119 Message-ID: <9008170545.aa01300@SEM.BRL.MIL> INFO-UNIX Digest Fri, 17 Aug 1990 V10#119 Today's Topics: Re: Recursion without -R Re: need help with FATAL error in unix 3.2u Coherent info Re: Coherent info Sys V or BSD for PDP 11/73 Wanted Re: More questions about how to issue a C-SHELL command within a C program Re: What's wrong with this Bourne shell script? Re: Cshell question: taking wordlists as a single string Re: Timeout on shell command. Printing with terminalservers Re: getting the exit value of an exec'd program Help on tools like SCCS, SPRs etc.. extracting files from a tar file Re: Cshell question. Or: How to make a fool of yourself Sending mail with explicit INTERNET address Re: Spy Programs?? Looking for a BCD library for Unix / C /-happy Re: /-happy Re: redirecting standard i/o from an exec'ed programme Unix supporting HANGUL (Korean) avail? Re: help sought - securing a terminal/line LaserWriter II printcap entry needed Looking for an adduser script. Changing back slashes to forward slashes Re: Changing back slashes to forward slashes addcol - # [Was: Re: What's wrong with this Bourne shell script?] Re: Converting to uppercase/lowercase in sed Re: MACH stripped from AT&T code ? sort with a tab as separator ----------------------------------------------------------------- From: micah altman <micah@sgi.com> Subject: Re: Recursion without -R Date: 15 Aug 90 17:53:22 GMT Sender: Net News <news@odin.corp.sgi.com> To: info-unix@sem.brl.mil In article <KAUL.90Aug14205729@icarus.eng.ohio-state.edu> kaul@icarus.eng.ohio-state.edu (Rich Kaul) writes: >In article <13595@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: > find . -print | xargs chown foo > > Of course, this only works if you have xargs, which is from System V and > is also available on SunOS in their System V software installation option. ... > If your version of find supports the -exec option you could recursively step through files and change the owner to "foo" by issueing the command find . -exec chown foo {} \; ( And yes, the "\;" at the end is necessary ) - Micah Altman Computational Juggler ----------------------------- From: "Dik T. Winter" <dik@cwi.nl> Subject: Re: Recursion without -R Date: 16 Aug 90 10:43:13 GMT Sender: news@cwi.nl To: info-unix@sem.brl.mil In article <1990Aug15.175322.23868@odin.corp.sgi.com> micah@sgi.com (micah altman) writes: > find . -exec chown foo {} \; > And do this only if user foo is in the local password file, not if foo is known through yellow pages. -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl ----------------------------- From: "Andrew A. Burgess" <aab@cichlid.com> Subject: Re: need help with FATAL error in unix 3.2u Keywords: parity error, NMI, floppy access, gateway2000 Date: 15 Aug 90 19:34:16 GMT To: info-unix@sem.brl.mil In article <601@bigbroth.UUCP> rk@bigbroth.UUCP (rohan kelley) writes: >Problems with unix 3.2u BellTech (Interactive) installation in >Gateway2000-25 cache system. > >Error message: >FATAL:Parity error on the motherboard >PANIC:Parity error address unknown > Trying to dump 1024 pages (etc) ... >Crash occurs when accessing the floppy drive (either 0 or 1) but only >at intermittent times. Commands current have been cpio and format. If ... I had a similar problem with an old AMI motherboard once. I first noticed that it would drop about one byte per million when reading from the tape drive. Repeating the read was successful. Note that there were no error messages from the tape drive -- it thought the tape had read correctly. I only became aware of a problem when doing a compare of disk to tape after a backup. Then I noticed that reading floppys had a similar problem. The only common denominator I could think of was that both subsystems used the motherboard DMA controller to transfer data. So I created a little test under DOS. I made a 500Kb file of random data and put two copies on a 1.2MB floppy. I then ran the DOS comp (file compare) program endlessly. The files would miscompare in a few minutes. Eventually the program would crash. My guess was that this one bye in a million was not just vanishing but instead being written to a 'random' location. This could be your problem. If so then a replacement motherboard would solve it (assuming you have a marginal component somewhere rather than a bad motherboard design). If the dealer is willing to swap and maybe give you another week or so to test, you might get lucky. Then again this is a WILD GUESS! You might also try writing a test program like mine. Good luck Andy -- Andy Burgess Independent Consultant uunet!silma!cichlid!aab aab@cichlid.com ----------------------------- From: Greg Montgomery <greg@turbo.atl.ga.us> Subject: Coherent info Date: 15 Aug 90 21:59:00 GMT To: info-unix@sem.brl.mil I'm looking for some info and opinions on Coherent from any users of it... I've talked to a tech at MW, and it sounds good, and a 386 version and DOS emulation is under development, so I've been considering getting it, but would like some opinions.. Please email any replies. Thanks... Greg ---- Greg Montgomery Internet: greg@turbo.atl.ga.us UUCP (smart): greg@turbo.UUCP UUCP (route): {rutgers,ogcise,gatech}!emory!turbo!greg ----------------------------- From: TURNER KENNETH WADE <turnerk@snoopy.colorado.edu> Subject: Re: Coherent info Date: 17 Aug 90 00:06:01 GMT Sender: news@boulder.colorado.edu To: info-unix@sem.brl.mil In article <2kTyN1w162w@turbo.atl.ga.us> greg@turbo.atl.ga.us (Greg Montgomery) writes: >I'm looking for some info and opinions on Coherent from any users of >it... I've talked to a tech at MW, and it sounds good, and a 386 version >and DOS emulation is under development, so I've been considering getting >it, but would like some opinions.. Hope this helps. Wade Turner ----------------------------- From: "Jay A. Snyder" <jay@gdx.uucp> Subject: Sys V or BSD for PDP 11/73 Wanted Date: 16 Aug 90 02:16:37 GMT To: info-unix@sem.brl.mil Does any one out there no where to get a copy of SYSV or BSD, or any version of unix newer than V7 for a DEC LSI 11/73 based system? echo wrong group flames >/dev/null -- ============================================================================== Jay A. Snyder "Let Me Up! I've had enough" wa3wbu!gdx!jay@uunet.uu.net uunet!wa3wbu!gdx!jay ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 07:34:52 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug16004855@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | Why not just use the putenv system call with something akin to: | | putenv("TERM=adm3a"); /* notify subprocess that it is an adm3a terminal */ Nope. That changes the *current* process (the C program), not the parent process (the parent shell). You *must* involve the parent process if you want programs invoked after the C program to see the change (unless you intend the C program to perform all the future invocations... yuck). Just another UNIX hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 14:22:10 GMT To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu> jian@kuhub.cc.ukans.edu writes: > system("/bin/csh -c 'setenv TERM adm3a"); (You're missing a quote ') >But none of them can change the terminal type. I don't know why. Your problem is that no change made to the environment variables of a subprocess can affect the environment variables of an ancestor process. This is why most of us make sure our TERM environment variable is properly set up by a file that is SOURCED, not executed in a subprocess, when our shell starts up (e.g. .profile or .login). ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 19:22:26 GMT To: info-unix@sem.brl.mil >Would someone point me another way to change terminal type within a C program >or give me some hints what I did wrong. I would appreciate any helps. As noted, the environment isn't "global", so setting an environment variable such as TERM in one process won't affect its value in any other existing processes; it'll only affect its initial value in processes forked from that process. If you want to change the value of an environment variable in a process running some arbitrary C program, check whether your system has the "putenv" routine (look for PUTENV(3) in the manual - unless you have some SCO system wherein they "improved" the manuals by changing the names of the sections, in which case I've no idea what the name would be). If not, see whether it has the "setenv" routine. If it has one or the other of those routines, the manual page should show you how to set an environment variable using the routine. Why do you need to change the setting of TERM within a program? The ultimate problem may lie deeper. (Also bear in mind that you should set TERM *before* you call *any* "curses" or "termcap" routines; otherwise, "curses" or "termcap" will start out using the old value of TERM, not the new value.) ----------------------------- From: Peter da Silva <peter@ficc.ferranti.com> Subject: Re: More questions about how to issue a C-SHELL command within a C program Date: 16 Aug 90 19:43:41 GMT To: info-unix@sem.brl.mil In article <25285.26c9113d@kuhub.cc.ukans.edu>, jian@kuhub.cc.ukans.edu writes: > execlp("/bin/csh", "csh", "-c", "setenv TERM adm3a", (char *) 0); You can't set your environment from a subshell. An environment is owned by a process and inherited by its children, but never passed back. You need to do something like print the commands on standard output, the way "tset" does: 47 % tset -s set noglob; setenv TERM at/386 console ; unset noglob; 48 % grep tset .login tset -s ... >/tmp/tset$$ source /tmp/tset$$ rm /tmp/tset$$ 49 % This way the variables get set in the parent shell and so stick around after the subshell or your C program (which is also a child of the shell) exits. If you just want to set variables for programs you call, try "putenv". -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com (currently not working) peter@hackercorp.com ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: What's wrong with this Bourne shell script? Date: 16 Aug 90 07:37:29 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <FPB.90Aug16005419@ittc.ittc.wec.com>, fpb@ittc (Frank P. Bresz) writes: | That would be fine if I had or wanted pearl. I was under the | impression that Jon's addcol was an awk script (I think that's where the | original thread came from anway) in which the -# was the column you wanted | to add and it would magically add up the numbers in column 1 or 7 or | whatever column you wanted under argumentalized control instead of having | separate scripts for each possible set of columns you want to add. Well, the script in awk is almost as easy: ... | awk '{ $x += $3 } END { print $x }' | who needs anything else? (But in Perl you can write it in one line. :-) Just another Perl hacker, more-or-less, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 13:00:47 GMT To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk>, I wrote: > > Basically, then, can Cshell cope with word-lists as single arguments, or > must I write a C program to do the job (or try sh or ksh?) > The solution was staring me in the face and I didn't see it until Jay Plett sent me this solution: % xxx "a b c" d e f a b c d e f % cat xxx #! /bin/csh -f while ( $#argv ) echo $1 shift end So you must use a while loop rather than a foreach loop. So obvious now I look at it. *sigh* Thanks to Jay for the enlightenment. -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Brad Appleton <brad@ssd.csd.harris.com> Subject: Re: Cshell question: taking wordlists as a single string Date: 16 Aug 90 15:26:41 GMT Sender: news@travis.csd.harris.com To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk> andy@syma.sussex.ac.uk (Andy Clews) writes: In article <3251@syma.sussex.ac.uk> you write: > The difficulty arises because I want to do (for example) > > whatnews "bug reports" > >where the intended effect is to search out all lines containing the >string "bug reports". At the moment it splits this up into "bug" and >"reports" and does two searches. This is because the script contains a > foreach i ($*) >loop for repeated searches. Quoting (single or double) doesn't help. Dont use "$*" in this case, use $argv and a while loop! The following should work in the manner you desire: @ i=1 while ( $i <= $#argv ) cmd "$argv[$i]" ##dont forget those quotes! . . . @ i++ end Im sure there are other solutions too (probably better ones) but this works (on my machone anyway) and should be easy to understand. Any other solutions out there? hope this helps! ______________________ "And miles to go before I sleep." ______________________ Brad Appleton brad@travis.ssd.csd.harris.com Harris Computer Systems ...!uunet!hcx1!brad Fort Lauderdale, FL USA ~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~ ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Timeout on shell command. Date: 16 Aug 90 14:13:25 GMT Sender: news@cs.vu.nl Followup-To: comp.unix.questions,alt.sources.d To: info-unix@sem.brl.mil In article <3716@sactoh0.UUCP>, jak@sactoh0.UUCP (Jay A. Konigsberg) writes: )... )command & # execute in background What if the command is supposed to run in the _foreground_? The following timeout shell script can be easily converted to a C program if desired. --------------------cut here-------------------- #!/bin/sh # @(#)timeout 6.2 90/03/01 Maarten Litmaath prog=`basename $0` usage="Usage: $prog [-signal] [timeout] [:interval] [+delay] [--] <command>" SIG=-KILL # default signal sent to the process when the timer expires, # unless a delay option has been given: then it is -TERM sigopt=0 timeout=60 # default timeout interval=15 # default interval between checks if the process is still alive delay= # (if specified) the delay between posting the given signal and # destroying the process (kill -KILL) while : do case $1 in --) shift break ;; -*) SIG=$1 sigopt=1 ;; [0-9]*) timeout=$1 ;; :*) EXPR='..\(.*\)' interval=`expr x"$1" : "$EXPR"` ;; +*) EXPR='..\(.*\)' delay=`expr x"$1" : "$EXPR"` case $sigopt in 0) SIG=-TERM esac ;; *) break esac shift done case $# in 0) echo "$usage" >&2 exit 2 esac ( for t in $timeout $delay do while test $t -gt $interval do sleep $interval kill -0 $$ || exit t=`expr $t - $interval` done sleep $t kill $SIG $$ && kill -0 $$ || exit SIG=-KILL done ) 2> /dev/null & exec "$@" -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Klaus Harbo <harbo@diku.dk> Subject: Printing with terminalservers Keywords: print terminalserver Date: 16 Aug 90 14:30:07 GMT To: info-unix@sem.brl.mil I want to be able to hook up printers on terminalservers, so that we can place our printers anywhere in the house. We use Ultrix on DECStations version 3.1. Our terminalservers are Bridge CS200. As far as I understand you can assign one of the physical ports on the terminalserver to have a separate IP address. What's needed then, is some kind of software that will send open a (TCP?) connection to that IP address, and send the print job to that port. Does anyone know of such software, and will the solution I suggest do the job? I do not know a lot about terminalservers, but I suppose it contains the software needed to handle TCP connections, directing the output to the physical port on the terminalserver assigned to the printer. Thanks in advance. -Klaus |--------------------------------------------------------------------------| | Klaus Harbo | | | Euromath Center | e-mail: harbo@euromath.dk | | Universitetsparken 5 | phone: +45 3135 3133 ext. 417 | | DK-2100 Copenhagen | fax: +45 3135 0427 | |--------------------------------------------------------------------------| -- |--------------------------------------------------------------------------| | Klaus Harbo | | | Euromath Center | e-mail: harbo@euromath.dk | ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: getting the exit value of an exec'd program Date: 16 Aug 90 14:40:38 GMT To: info-unix@sem.brl.mil In article <1990Aug15.223952.1175@NCoast.ORG> atul@NCoast.ORG (Atul Parulekar) writes: >May be the answer is in the manual, but I have not been able to find it. >My problem is that if I run a program using fork and execvp, how do I get >the exit value of the exec'd program into the main program. Via wait(). The general procedure for running a subprocess is, in outline: switch ( (pid = fork()) ) { case -1: Punt( "unable to fork" ); /*NOTREACHED*/ case 0: /* child */ args[0] = "command"; execvp( args[0], args ); /* WARNING: uses $PATH */ _exit( 127 ); /*NOTREACHED*/ default: /* parent */ while ( (w = wait( &status )) != pid ) if ( w == -1 && errno != EINTR ) break; if ( w == -1 ) { Punt( "child disappeared" ); /*NOTREACHED*/ } else if ( (status & 0xFF) != 0 ) { /* (status & 0x7F) is the signal number */ /* (status & 0x80) != 0 iff core dumped */ Punt( "child terminated abnormally" ); /*NOTREACHED*/ } else status = status >> 8 & 0xFF; /* exit status */ } ----------------------------- From: 35G-PATEL <vsp@hjuxa> Subject: Help on tools like SCCS, SPRs etc.. Date: 16 Aug 90 14:48:33 GMT To: info-unix@sem.brl.mil We are in planning phase for a year long system software dvl project. We are working on a UNIX system. We are planning to use SCCS for source control. 1) Is there any other software that is like/better than SCCS? (preferably from public domain) 2) Software to manage MRs (modification requests) and QARs (Quality Assurance Report) to track bug fixes during development/field test? 3) Package that can combine both of these features to keep software in sync with any updates from QARs etc. 4) Are there any other groups for these questions? You may mail me directly. I will post the results sometime in the future. Thankx. vsp@unx.dec.com -- ============================================================================= ___ ___ ___ ___ ___ ___ ___ Vipul Patel ----------------------------- From: Bob Fyfe <fyfe@bgsuvax.uucp> Subject: extracting files from a tar file Keywords: tar Date: 16 Aug 90 15:05:39 GMT To: info-unix@sem.brl.mil I have a faculty member who has brought a tape with him from a different site. It is a tar tape and the files were stored using absolute pathnames. The difficulty is that we don't have the same file structure names and so when I would try to restore the files, it fills up the root file structure quickly (we don't keep a whole lot of space available in that partition). I was wondering if there are any PD programs that exist or whether someone has written a script to get around this problem. I could write a script to extract a file at a time and then move it but its a hassle trying to maintain the directory structure that the faculty member has and preserve modification dates. I've also considered writing a C program using the chroot function and doing a system call to tar but that seems messy too. Is there anything out there available or am I missing something in my own backyard? Any help would be appreciated. You can direct email any solutions to me. Bob Fyfe *************************************************************************** * Bob Fyfe / EMT-A/ Ham Radio KA8YWQ | INTERNET: fyfe@andy.bgsu.edu * * University Computer Services | BITNET: fyfe@bgsuopie * * Bowling Green State University (OH)| UUCP: ...!osu-cis!bgsuvax!fyfe * *************************************************************************** -- *************************************************************************** * Bob Fyfe / EMT-A/ Ham Radio KA8YWQ | INTERNET: fyfe@andy.bgsu.edu * * University Computer Services | BITNET: fyfe@bgsuopie * * Bowling Green State University (OH)| UUCP: ...!osu-cis!bgsuvax!fyfe * *************************************************************************** ----------------------------- From: Andy Clews <andy@syma.sussex.ac.uk> Subject: Re: Cshell question. Or: How to make a fool of yourself Date: 16 Aug 90 15:43:14 GMT To: info-unix@sem.brl.mil In article <3269@syma.sussex.ac.uk>, I stupidly wrote: > So you must use a while loop rather than a foreach loop. So obvious now > I look at it. *sigh* I am making a rather embarrassing fool of myself. Marten Litmaath very correctly pointed out that foreach i ($*:q) etc. will work just as well. *And* it's all in TFM. I apologise for wasting net bandwidth. I will now shut up. *SIGH* It's been one of them days.... -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac ----------------------------- From: Dan Mercer <mercer@npdiss1.stpaul.ncr.com> Subject: Sending mail with explicit INTERNET address Date: 16 Aug 90 16:10:15 GMT To: info-unix@sem.brl.mil I have accounts on two different systems tcp/ip'd together across an Ethernet backbone. Neither node is on the backbone, but the networks they are on are gated to the backbone. On my home system, where I have sysadmin privileges, the remote system is in my /etc/hosts file. On the remote system, where I'm a guest, my home system has not been put in their /etc/hosts file despite numerous requests. I can ftp and telnet from the remote to my home system by using explicit decimal dot addressing. My problem is, how do I mail stuff to myself by the same method? TIA -- Dan Mercer Reply-To: mercer@npdiss1.StPaul.NCR.COM (Dan Mercer) "MAN - the only one word oxymoron in the English Language" ----------------------------- From: Isaac Rabinovitch <ergo@netcom.uucp> Subject: Re: Spy Programs?? Date: 16 Aug 90 16:57:53 GMT To: info-unix@sem.brl.mil In <3715@sactoh0.UUCP> jak@sactoh0.UUCP (Jay A. Konigsberg) writes: >In article <24123@adm.BRL.MIL> senetza@hg.uleth.ca (Leonard Senetza) writes: >>I have a few 'hostile' users on my system here. I was wondering if anyone has >>a 'spy' type of program that would allow me to watch/record/control other >>users' sessions. I could possibly write one myself, but why re-invent the >>wheel? >> >There are a few ways to do this. However, assuming you _are_ the >administrator of the system, there is one reasonably easy way. >Take the cables running to these hostile users terminals and splice into >them. Assuming everyone (including yourself) is using the same type of >terminal, you can then run the T from the splice to your terminal. To >be on the safe side, you probably don't want to connect the "write" pin >(2 or 3, I can never remember). A similar, and possibly more useful, approach would be to run the cable through a PC running one of those RS-232 diagnostic programs that captures data. Of course, you'd need a PC with two serial ports. Permanent records are always useful when legality time comes 'round. And if the bad guy isn't using your usual type of terminal, you can just save everything until you can figure out how his escape codes work. -- ergo@netcom.uucp Isaac Rabinovitch atina!pyramid!apple!netcom!ergo Silicon Valley, CA uunet!mimsy!ames!claris!netcom!ergo Disclaimer: I am what I am, and that's all what I am! ----------------------------- From: Stig Jacobsen <shj@login.dkuug.dk> Subject: Looking for a BCD library for Unix / C Keywords: BCD,library Date: 16 Aug 90 17:06:40 GMT Sender: news@slyrf.dkuug.dk Followup-To: comp.lang.c To: info-unix@sem.brl.mil Does anyone know of a BCD library for Unix? It doesn't matter whether it is commercial, free, whatever (I haven't seen any at all!). Please mail me any info that you have - thanks in advance. -- Stig Jacobsen shj@login.dkuug.dk fidonet 2:231/16.0 ----------------------------- From: John H Merritt <merritt@iris613.gsfc.nasa.gov> Subject: /-happy Date: 16 Aug 90 17:20:49 GMT Sender: news@dftsrv.gsfc.nasa.gov To: info-unix@sem.brl.mil Explain why '/////' is valid in the following statement: cd /./../tmp/////../././bin It is interesting that any permutation of '.', '..', '/' and directory names can be used with, at least, csh, sh, and tcsh to yield a valid path name. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ John H. Merritt # Yesterday I knew nothing, Applied Research Corporation # Today I know that. merritt@iris613.gsfc.nasa.gov # ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: /-happy Date: 16 Aug 90 21:50:45 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3139@dftsrv.gsfc.nasa.gov>, merritt@iris613 (John H Merritt) writes: | Explain why '/////' is valid in the following statement: | | cd /./../tmp/////../././bin | | It is interesting that any permutation of '.', '..', '/' and directory | names can be used with, at least, csh, sh, and tcsh to yield a valid | path name. The null pathname (look carefully between the consecutive "/"-s, and you'll see them there) is a valid synonym for the "current directory". So aaa////bbb is the same as aaa/././././bbb, except that you don't have to stat "." four additional times (it'd be fast, but it still takes time). Just another Unix hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "William (Bill" <mayne@vsserv.scri.fsu.edu> MMDF-Warning: Parse error in original version of preceding line at BRL.MIL Subject: Re: redirecting standard i/o from an exec'ed programme Keywords: popen, io, exec, system Date: 16 Aug 90 17:38:04 GMT Sender: news@sun13.scri.fsu.edu To: info-unix@sem.brl.mil In article <377@fe2o3.UUCP> michael@fe2o3.UUCP (Michael Katzmann) writes: > >I have a task that requires the ability to fork off another programme but >to supply it's standard input and output. The SysV manuals describe > > FILE *popen( command, type ) > char *command, *type; > >which execs the command a la "system()" and creates a pipe. "type" and be >"r" if you want to read from the standard output of "command", or "w" if >you want to write to standard input. However there doesn't seem to be any >way to use this routine to do both similtaneously. > >What is the usual way to to this? > >Important points: The exec'ed command must run asynchronously (obvious if > the parent is supplying input.) > > The child process id must be available to the parent. > (so that it can be killed if necessary) > > >Any ideas would be appreciated. > > >--------------------------------------------------------------------- >email to >UUCP: uunet!mimsy!{arinc,fe2o3}!vk2bea!michael > _ _ _ _ > Amateur | VK2BEA (Australia) ' ) ) ) / // > Radio | G4NYV (United Kingdom) / / / o _. /_ __. _ // > Stations| NV3Z (United States) / ' (_<_(__/ /_(_/|_</_</_ > >Michael Katzmann >Broadcast Sports Technology. >2135 Espey Ct. #4 >Crofton Md. 21114 USA > >Ph: +1 301 721 5151 Although, as a response on the net indicates, there can be problems connecting both stdin and stdout from a child if you aren't very careful about protocols there are cases where it is useful. As you have discovered popen() won't do it, though. I have waited to see if a detailed answer was provided by others. Since I haven't seen one I will post part of a program I wrote which does this. The key is that the child inherits stdin and stdout from the parent, so the parent changes his own stdin and stdout to pipes before spawning the child, using dup() to change file desciptors. The purpose of this program is to run all permutations of given string through the program used by the standard spell script looking for all the words which can be formed from the letters in the input, as when solving word puzzles such as "Jumbles" found in many newspapers. I have omitted the details and tried to leave everything necessary to (1) see how to do the i/o redirection you wanted to do and (2) see the whole structure of the process tree in which this was used in a realistic (or at least fun) application. The permutation generator created the list of permutations in sorted order since this was much faster than creating the whole list and then sorting, even if space permitted. It also actually generated two separate streams of permutations since that was actually more efficient than splitting one up and avoided possible deadlock problems. I hope the editting jobs leaves enough for you to see what is going on without getting lost in details. Incidentally I tried to email the whole thing but got "host not known". Can experienced netters suggest how I might be able to use the routing show at the top of a post to reply even when my local host doesn't know the final destination? /* anagram.c - extracted fragments to show redirection */ #include <string.h> #include <stdio.h> #ifndef SPELLPROG #define SPELLPROG "/usr/bin/spellout" #endif #ifndef DICT #define DICT "/usr/dict/hlista" #endif /* Omitting some irrelevant stuff here */ main(argc,argv,envp) int argc; char **argv, **envp; { int pipe1[1], pipe2[2]; char word[21]; int i; #define TOCHILD pipe1[1] #define FROMCHILD pipe2[0] #define TOPARENT pipe2[1] #define FROMPARENT pipe1[0] /* Stuff omitted */ pipe(pipe1); pipe(pipe2); if (fork()==0) { if (fork()==0) { /* Child to invoke spell program in a pipeline */ /* Close unused pipes */ close (TOCHILD); close (FROMCHILD); /* Change stdin and stdout to pipe */ close(0); dup(FROMPARENT); close(1); dup(TOPARENT); /* Invoke spell command */ execl(SPELLPROG,"spellout",DICT,(char *)0); /* No return to here. For completeness make parent terminate */ } else { /* Process to send distinct permutations to spelling checker */ /* Close unused pipes */ close(FROMCHILD); close(TOPARENT); close(FROMPARENT); /* Switch stdout to TOCHILD pipe */ close(1); dup(TOCHILD); /* Send all distinct permutations to spell child */ /* by writing them to stdout - details omitted */ } } else { /* Root process invokes permute() to display accepted permutations */ /* Close unused pipes */ close(TOCHILD); close(TOPARENT); close(FROMPARENT); /* Change stdin to pipe from speller */ close(0); dup(FROMCHILD); /* Generate permutations in sorted order; Read misspellings from pipe; Print everything not on misspell list; - details omitted */ } } ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: redirecting standard i/o from an exec'ed programme Date: 16 Aug 90 18:53:10 GMT Sender: news@cs.vu.nl To: info-unix@sem.brl.mil In article <410@sun13.scri.fsu.edu>, mayne@VSSERV.SCRI.FSU.EDU (William (Bill) Mayne) writes: )... ) /* Close unused pipes */ ) close (TOCHILD); ) close (FROMCHILD); ) /* Change stdin and stdout to pipe */ ) close(0); ) dup(FROMPARENT); close(FROMPARENT); /* !!! */ ) close(1); ) dup(TOPARENT); close(TOPARENT); /* !!! */ I've deleted the rest of the code, but there were still a few other places where calls to close() should be added. Always close every unused file descriptor (esp. when dealing with pipes), else you will get bitten one day; example scenario: - the child exits - the parent reads from the pipe to the child - the parent still has the write side of the pipe open - the read hangs... -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Russ Romero <rrome@atr-14.hac.com> Subject: Unix supporting HANGUL (Korean) avail? Date: 16 Aug 90 17:58:21 GMT Sender: news@hacgate.uucp To: info-unix@sem.brl.mil Looking for a version of UNIX from a COTS vendor which supports the Korean character set HANGUL. As I understand it (rather, think I understand it), this is a 27 letter set of phonetic characters, using a two byte code. Anyway, if you know about it, you know better what it is than I. Please e-mail (doubt there's widespread interest in this). Any clues accepted. THANKS rrome@1lkernel.hac.com ====================================================== Russ Romero ============================================ (brilliant opinions proprietary) ----------------------------- From: Peter Murray <pemurray@miavx1.acs.muohio.edu> Subject: Re: help sought - securing a terminal/line Date: 16 Aug 90 18:03:55 GMT To: info-unix@sem.brl.mil In article <1990Aug14.161816.3450@chinet.chi.il.us>, les@chinet.chi.il.us (Leslie Mikesell) writes: > Does anything support the now-ubiquituous devices that announce the connection > speed in ASCII before bringing up CD or does everyone still have to > write their own code for this if they don't want the users to have to > send something before getting the login prompt? I found the source code for AGETTY, an alternative getty for SYSV, at gatekeeper.dec.com (annonymous FTP) when I was working with this problem before. This program should do the trick for you, and it is (relatively) easy to port it to BSD, if you need to. Peter -- Peter Murray Neat UNIX Stunts #7: pemurray@miavx1.bitnet 215 Foxfire Dr #308 csh> %blow murrayp@apsvax.aps.muohio.edu Oxford, OH 45056 NeXT Mail: pmurray@next4.acs.muohio.edu ----------------------------- From: "Joe.Fernandez" <joe@robin.sandiego.ncr.com> Subject: Re: help sought - securing a terminal/line Date: 16 Aug 90 20:11:31 GMT Sender: news@iss-rb.sandiego.ncr.com To: info-unix@sem.brl.mil In article <=D25VBE@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: >In article <3846@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes: >> For UNIX-like systems with "ttymon", such as System V Release 4, I think >> there's some other magic you can do to arrange that "ttymon" run your >> program when the port starts up. > >You're saying V.4 doesn't use inittab? > >Um, this is not good. The flexibility of inittab has been very helpful. I >don't want to go back to kludging a login or getty front-end again. inittab still exists in SVR4. ttymon is a STREAMS-based port monitor that detects connection requests on the tty ports. It replaces the getty processes. SVR4 now has one process doing the work that lots of getty processes had to do in in pre-SVR4. A connection request is when one non-break char followed by a new line char is received on the port. When ttymon detects the connection request it executes the service process that has been configured for that port. One example of a service process is our old friend the login process. But you can create your own specific service process. This is unlike pre-SVR4 where the only service process that can be invoked from getty is 'login'. inittab starts the ttymon and any other port monitors (e.g., listen) that may exist on the system. Users can develop their own port monitors. --Hope this helps ============================================================================ Joe Fernandez NCR Corporation, MS# 9140 (619) 485-2186 16550 W. Bernardo Dr. uunet!ncrlnk!ncr-sd!iss-rb!robin!joe San Diego, CA 92127 ----------------------------- From: Martin Brooks <mb33@prism.gatech.edu> Subject: LaserWriter II printcap entry needed Keywords: Sun4 Apple Date: 16 Aug 90 18:30:42 GMT To: info-unix@sem.brl.mil Does anyone have an /etc/printcap entry that would work with an Apple LaserWriter II connected to a Sun4/280 via serial port? If so, please send mail. Thanks in advance. -- Martin Brooks - Georgia Tech - Atlanta, Georgia, USA uucp: ...!gatech!prism!mb33 Internet: mb33@prism.gatech.edu ----------------------------- From: Jamie Gobble <jkg@juliet.cs.duke.edu> Subject: Looking for an adduser script. Date: 16 Aug 90 19:12:17 GMT Sender: news@duke.cs.duke.edu To: info-unix@sem.brl.mil Hi, Do any of you have an adduser script written perl or awk? If so, or if you know of another good approach, please drop me a line. Thanks, Jamie. p.s. Of course, I'll summarize and post if enough of you me to want. --- Jamie Gobble, sounds like "go-bull" Computational Neuroscience Lab Dept. of Neurobiology O_o -Ack! inet: jamie@neuro.duke.edu Duke Univ. Med. Ctr., Box 3209 =( )= bnet: GOBBL001@DUKEMC Durham, N.Carolina 27710, USA U Work (919) 684-5748 ----------------------------- From: Ramon F Herrera <ramon@skye.mit.edu> Subject: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 19:46:44 GMT Sender: Mr Background <daemon@athena.mit.edu> To: info-unix@sem.brl.mil I have a question for those {sed, grep, awk, tr} wizards out there. I'd like to change all the occurrences in a file of a line like this: #include "dira\dirb\incl.h" to #include "dira/dirb/incl.h" but only for the lines that begin with "#include". As you may have guessed, I am porting a PC-DOS program to Unix. thanks, Ramon -- Ramon F. Herrera Research Laboratory of Electronics Massachusetts Institute of Technology ramon@iona.mit.edu ----------------------------- From: Lee F Kolakowski <lfk@athena.mit.edu> Subject: Re: Changing back slashes to forward slashes Date: 16 Aug 90 20:33:32 GMT Sender: Mr Background <daemon@athena.mit.edu> To: info-unix@sem.brl.mil On Thu, 16 Aug 90 19:46:44 GMT, ramon@skye.mit.edu (Ramon F Herrera) said: > I have a question for those {sed, grep, awk, tr} wizards out there. > I'd like to change all the occurrences in a file of a line like this: > #include "dira\dirb\incl.h" > to > #include "dira/dirb/incl.h" > but only for the lines that begin with "#include". Try: awk ' { if ($0 ~ /^#include/) gsub(/\\/, "/") print }' filename Frank Kolakowski ====================================================================== |lfk@athena.mit.edu || Lee F. Kolakowski | |lfk@eastman2.mit.edu || M.I.T. | |kolakowski@wccf.mit.edu || Dept of Chemistry | |lfk@mbio.med.upenn.edu || Room 18-506 | |lfk@hx.lcs.mit.edu || 77 Massachusetts Ave.| |AT&T: 1-617-253-1866 || Cambridge, MA 02139 | |--------------------------------------------------------------------| | #include <woes.h> | | One-Liner Here! | ====================================================================== -- Frank Kolakowski ====================================================================== |lfk@athena.mit.edu || Lee F. Kolakowski | |lfk@eastman2.mit.edu || M.I.T. | |kolakowski@wccf.mit.edu || Dept of Chemistry | |lfk@mbio.med.upenn.edu || Room 18-506 | |lfk@hx.lcs.mit.edu || 77 Massachusetts Ave.| |AT&T: 1-617-253-1866 || Cambridge, MA 02139 | |--------------------------------------------------------------------| | #include <woes.h> | | One-Liner Here! | ====================================================================== ----------------------------- From: Rouben Rostamian <rouben@math13.math.umbc.edu> Subject: Re: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 20:57:51 GMT Sender: newspost@umbc3.umbc.edu To: info-unix@sem.brl.mil In article <1990Aug16.194644.14376@athena.mit.edu> ramon@skye.mit.edu (Ramon F Herrera) writes: | |I have a question for those {sed, grep, awk, tr} wizards out there. |I'd like to change all the occurrences in a file of a line like this: | |#include "dira\dirb\incl.h" | |to | |#include "dira/dirb/incl.h" | |but only for the lines that begin with "#include". | sed <infile -e '/\#include/s/\\/\//g' >outfile -- Rouben Rostamian Telephone: (301) 455-2458 Department of Mathematics and Statistics e-mail: University of Maryland Baltimore County rostamian@umbc.bitnet Baltimore, MD 21228, U.S.A. rostamian@umbc3.umbc.edu ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 16 Aug 90 21:53:18 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <1990Aug16.194644.14376@athena.mit.edu>, ramon@skye (Ramon F Herrera) writes: | | I have a question for those {sed, grep, awk, tr} wizards out there. | I'd like to change all the occurrences in a file of a line like this: | | #include "dira\dirb\incl.h" | | to | | #include "dira/dirb/incl.h" | | but only for the lines that begin with "#include". perl -pi~ -e 's#\\#/#g if /^#include/' file1.c file2.c file3.c ... Pretty darn simple with Perl. Even leaves you a backup. Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: "Frank P. Bresz" <fpb@ittc.wec.com> Subject: addcol - # [Was: Re: What's wrong with this Bourne shell script?] Date: 16 Aug 90 20:19:19 GMT Sender: news@ittc.wec.com To: info-unix@sem.brl.mil In article <416@necssd.NEC.COM> harrison@necssd.NEC.COM (Mark Harrison) writes: >Here is a simple one in awk. Replace $4 with your column number. > awk '{ tot += $4} END{print tot}' > ^^ >If you put this into a shell script called addcol, you can say > awk '{ tot += $'$1'} END{print tot}' >and invoke it by > addcol 4 >Example: How many bytes in my files? > ls -l c* | awk '{ tot += $4} END{print tot}' > ls -l c* | addcol 4 >Hope this helps! It is EXACTLY what I was looking for. Thank you very much for weeding through and figuring out what I really wanted.!! -- +--------------------+ |fbresz@ittc.wec.com | My opinions are my own, I'm not paid |uunet!ittc!fbresz | enough to make an official statement |(412)733-6749 | +-----------------------------------+ |Fax: (412)733-6444 | | THIS SPACE FOR SALE!!! | +--------------------+ +-----------------------------------+ ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Converting to uppercase/lowercase in sed Date: 16 Aug 90 23:21:51 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <3766@umbc3.UMBC.EDU>, rostamia@umbc5 writes: | Is there a way to convert characters to uppercase or to lowercase in sed? | In EX the command | s/asdf/\U&/ | changes the string asdf to ASDF, but ed and sed do not seem to be as | sophisticated as ex :-( | | Any ideas? yeah, the not very well documented "y" command. y/a-z/A-Z/ uppercases the pattern space. You'll have to juggle the pattern and hold spaces if you want just part of a line uppercased. Or get Perl. :-) -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Melinda Shore <shore@mtxinu.com> Subject: Re: MACH stripped from AT&T code ? Date: 17 Aug 90 01:06:57 GMT To: info-unix@sem.brl.mil In article <3229@uniol.UUCP> moeller@uniol.UUCP (Klaus Moeller) writes: >It was said somewhere( I don't know where) that the MACH Kernel >contains no AT&T code anymore. This is a *very* common misconception. The current Mach kernel contains significant amounts of BSD code and requires an AT&T license. The 3.0 Mach kernel will be free of AT&T code, but how useful it will be to the average user without an environment, filesystem, device drivers, etc. (all would require licenses) is left as an exercise for the reader. -- Melinda Shore shore@mtxinu.com mt Xinu ..!uunet!mtxinu.com!shore ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: sort with a tab as separator Date: 17 Aug 90 01:21:42 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil How do I indicate to sort that my field-separation character is the tab (^I)? I know that there is a tab option (-t) in sort, but I don't know how to specify ^I ( or \t, for that matter).. No, the default is not this tab, but any whitespace character according to my documentation. Thanks for any help. /ivo welch ivo@next.agsm.ucla.edu ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/21/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 18 Aug 90 05:45:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#120 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Sat, 18 Aug 90 05:30:16 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab15042; 18 Aug 90 5:56 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa15035; 18 Aug 90 5:46 EDT Date: Sat, 18 Aug 90 05:45:38 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#120 Message-ID: <9008180546.aa15035@SEM.BRL.MIL> INFO-UNIX Digest Sat, 18 Aug 1990 V10#120 Today's Topics: Re: -F option for awk Re: Working with sed Re: How to tell if a process exists Re: the f2c program Re: nutshell book on uucp nutshell book on uucp 8mm Reliability Re: What's wrong with this Bourne shell script? Re: recursive variable substitution in csh Re: directory "indexer" Re: OK, so who runs SVR4 ?? Onyx C8002; anyone else have one? no ETXTBUSY in SVr4? Re: /-happy Re: get terminal speed from shell script rm delayed? Re: rm delayed? AT&T 3B2 computer info wanted before 8/20/90 ::::::::)))) Re: Changing back slashes to forward slashes Re: Converting to uppercase/lowercase in sed European X windows User Group Conference forecasting, measuring, simulation and modeling tools. Re: Printing with terminalservers Wanted: ftp sites for c-shell programs Re: Cshell question: taking wordlists as a single string herror(3) Opening for output on a terminal server (was Printing with terminalservers) Nutshell Handbook on sendmail doesn't exist yet Re: sort with a tab as separator Adding on to the history mechanism How do I change the number of lines on my term? UNIX System V.3 benchmarks Automatic notification of file system changes Re: getting the exit value of an exec'd program Running "The Complete Answering Machine" under DOS emulation C-shell variables /dev/ptmx, granpt(), ptsname() etc .. HELP ----------------------------------------------------------------- From: Jim Rogers <jimr@hp-lsd.cos.hp.com> Subject: Re: -F option for awk Date: 14 Aug 90 18:48:06 GMT To: info-unix@sem.brl.mil The answer is to set up the output field separator to be a colon also. For instance: awk -F":" 'OFS = ":" { print $1, $2 }' /etc/passwd will print out the first two fields of the password file with the output fields separated by colons. Jim Rogers Hewlett Packard Company ----------------------------- From: Jeff Beadles <jeff@onion.pdx.com> Subject: Re: Working with sed Date: 15 Aug 90 23:09:44 GMT To: info-unix@sem.brl.mil nr3m@unix.cis.pitt.edu (Matthew A Henry) writes: |>I'm writing a script that uses sed, and am having trouble with one |>part. I have a file that contains typical unix paths, one per |>line, and would like to remove everything after the last forward |>slash (/). In other words I would like the string: |> /aaa/bbb/ccc/ddd/eee |>to be changed to: |> /aaa/bbb/ccc/ddd Of course it is. (You can do 'most anything with sed :-) Run the file thru this: sed 's:/[^/][^/]*$::' < file1 > file2 Have fun! -Jeff -- Jeff Beadles jeff@onion.pdx.com ----------------------------- From: Jeff Beadles <jeff@onion.pdx.com> Subject: Re: How to tell if a process exists Date: 15 Aug 90 23:15:37 GMT To: info-unix@sem.brl.mil samlb@pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes: >boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: >>Wrong. RTFM -- kill(pid, 0) > Hmmm -- must be running Reverse Polish Unix down under, 'cause my >manual sez: " kill [-sig] processid... ", and I've been doing it that way >for a looooooooong time. > What kind of UNIX _are_ you running?? Well, most any modern variant. The kill(pid,0) version is for the 'C' programming language. See the kill(2) man page. kill -SIG pid is a simple C program that's called by the shell. -Jeff -- Jeff Beadles jeff@onion.pdx.com ----------------------------- From: rick@tmiuv0.uucp Subject: Re: the f2c program Date: 16 Aug 90 13:19:42 GMT To: info-unix@sem.brl.mil In article <1990Aug11.202542.9891@ux1.cso.uiuc.edu>, mcdonald@aries.scs.uiuc.edu (Doug McDonald) writes: > On the computer research.att.com is a program called "f2c". It converts > Fortran programs to, mostly, C. But it does NOT convert Fortran IO > calls to C. Instead it just invokes some mysterious io routines. I > take these to be somebody's Fortran IO runtime library - indeed, there > are linking with certain libraries. But WHOSE libraries? The mysterious routines are libf77 and libi77, available from the same source. I quote from the index for f2c: libf77 Library of non I/O support routines the generated C may need. Fortran main programs result in a C function named MAIN__ that is meant to be invoked by the main() in libf77. libi77 Library of Fortran I/O routines the generated C may need. Note that some vendors (e.g., BSC, Sun, and MIPS) provide a libF77 and libI77 that are incompatible with f2c -- they provide some differently named routines or routines with the names f2c expects, but with different calling sequences. On such systems, the recommended procedure is to merge libf77 and libi77 into a single library, say libf2c and install it where you can access it by specifying -lf2c. The libraries and source are available from the same source as f2c. > Doug McDonald(mcdonald@aries.scs.uiuc.edu) -- ---------------------------------------------------------------------------- [- O] Rick Stevens ? EMail: uunet!zardoz!tmiuv0!rick -or- uunet!zardoz!xyclone!sysop V CIS: 75006,1355 (75006.1355@compuserve.com from Internet) "Reality is a crutch for people who can't handle science fiction." ---------------------------------------------------------------------------- ----------------------------- From: rick@tmiuv0.uucp Subject: Re: nutshell book on uucp Date: 16 Aug 90 13:27:10 GMT To: info-unix@sem.brl.mil In article <9008091533.AA00951@lilly2.lab.fj.bapd>, tr@lilly2.lab.fj.bapd writes: > I once saw a book on uucp communications. It had the word "nutshell" > in the title, and I think it had a picture of an acorn on the cover. > Does anyone know where I can get this book or something else that > describes how to configure uucp on unix? There are really two Nutshell handbooks on UUCP. One is called "Managing UUCP and Netnews", the other is "Using UUCP and Netnews". Both are entries in O'Reilly and Associates' series of Nutshell handbooks which cover a wide range of Unix-related subjects including X-Windows, Unix in general, and much more. I don't have the address of O'Reilly handy, unfortunately, but I'll post a followup regarding their address. > Thanks. > > Tom Reingold You're welcome! 8-) ---------------------------------------------------------------------------- [- O] Rick Stevens ? EMail: uunet!zardoz!tmiuv0!rick -or- uunet!zardoz!xyclone!sysop V CIS: 75006,1355 (75006.1355@compuserve.com from Internet) "Reality is a crutch for people who can't handle science fiction." ---------------------------------------------------------------------------- ----------------------------- From: Jean Marie Diaz <ambar@ora.com> Subject: Re: nutshell book on uucp Date: 17 Aug 90 15:53:13 GMT Sender: news@ora.com To: info-unix@sem.brl.mil From: rick@tmiuv0.uucp Date: 16 Aug 90 13:27:10 GMT There are really two Nutshell handbooks on UUCP. One is called "Managing UUCP and Netnews", the other is "Using UUCP and Netnews". Both are entries in O'Reilly and Associates' series of Nutshell handbooks which cover a wide range of Unix-related subjects including X-Windows, Unix in general, and much more. I don't have the address of O'Reilly handy, unfortunately, but I'll post a followup regarding their address. See my .sig for current addresses and phone numbers. AMBAR ambar@ora.com uunet!ora!ambar O'Reilly & Associates, Inc. Publishers of Nutshell Handbooks 90 Sherman Street, Cambridge, MA 02140; 617-354-5800 Book Orders => 632 Petaluma Ave, Sebastopol, CA 95472 800-338-NUTS (in CA 800-533-NUTS) FAX 707-829-0104 ----------------------------- From: tr@lilly2.lab.fj.bapd Subject: nutshell book on uucp Date: 17 Aug 90 19:25:01 GMT Sender: daemon@ucbvax.berkeley.edu To: info-unix@sem.brl.mil I just noticed that /bin/mail will send mail with a bogus return address if you want it to. Just set the LOGNAME variable to whatever you want. Is this a glaring bug that everyone knows about? Or is it something we have to put up with for some reason. Tom Reingold AT&T att!journey!treingold Juniper Plaza, Route 9 treingold@journey.att.com Room 1A-133 (201) 577-5814 [work] Freehold, NJ 07728-3298 (201) 287-2345 [home] ----------------------------- From: Calvin Hayden x2254 <cgh018@tijc02.uucp> Subject: 8mm Reliability Date: 16 Aug 90 16:16:52 GMT To: info-unix@sem.brl.mil General question... this may have been brought up in some earlier postings, but its been a while since I've looked at `em daily. Any statistics on how reliable 8mm cartridge tapes are when used for archival purposes (say stored without use for 3+ years)? How do they compare to 1/2" 9 track, or 1/4" QIC for a purpose such as this. Reason I ask is this: we are moving off a vax with a 9 track drive onto a network of suns with 8mm and 1/4". We have quite a few tapes archived on 9 track, which I am in the process of moving over to a media I have avaliable on the Suns. There are no plans for a 9 track drive on the suns. In summary: How does 8mm tape storage compare with 1/4" QIC or 1/2" 9 track in the area of extended storage? Is one any better than the other for this purpose? If so, which? A 9 track may be purchased if its tapes are more reliable as archive media. Email preffered, followups accepted... Thanks in advance! -- Calvin Hayden Texas Instruments, Johnson City, Tn. Voice (615)461-2254 UUCP: ...mcnc!rti!{olympus,tijc02}!{root,cgh018} ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: What's wrong with this Bourne shell script? Date: 16 Aug 90 16:26:34 GMT Sender: news@convex.com To: info-unix@sem.brl.mil In article <FPB.90Aug16005419@ittc.ittc.wec.com> fbresz@ittc.wec.com writes: [chiding of Randal deleted] > That would be fine if I had or wanted pearl. I was under the >impression that Jon's addcol was an awk script (I think that's where the >original thread came from anway) in which the -# was the column you wanted >to add and it would magically add up the numbers in column 1 or 7 or >whatever column you wanted under argumentalized control instead of having >separate scripts for each possible set of columns you want to add. You mean perl, but anyway.... usage: addcol field_number as in 'ls -l | addcol 5' #!/bin/sh field=$1 shift awk "{sum += \$$field;}END {print sum}" $* If you want to bullet-prove it against bad args, you can do more checking --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [gwyn] ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: recursive variable substitution in csh Date: 16 Aug 90 18:38:24 GMT Sender: news@convex.com To: info-unix@sem.brl.mil In article <9045@cg-atla.agfa.com> jmacdon@cg-atla.UUCP (Jeff MacDonald) writes: >In the C-shell, how does one evaluate a variable which contains the >name of a variable in order to get the value of the variable >contained by the variable that one is evaluating? > >set x = 'ABC' >set y = '$x' >set z = # some function of y such that $z == "ABC" % eval set z = "$y" % echo $z % ABC --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [gwyn] ----------------------------- From: Fred Stluka <stluka@software.org> Subject: Re: directory "indexer" Keywords: search,directory,index Date: 16 Aug 90 21:02:49 GMT Sender: news@software.org To: info-unix@sem.brl.mil In article <335@nih-csl.nih.gov> tpersky@alw.nih.gov (Ted Persky) writes: > The people in our lab always seem to be asking each other > to help them locate the path name for "foo.c". > ... > What I'm wondering is whether anyone knows of a tool where > one can define a directory as being the root of a "large file > tree" and have an index of some sort placed at that root. After > that is created, each person who creates a file in that particular > sub-tree would type in some sort of librarian command to create > an entry in the index with a brief description of the file. > Then the index (in database form, preferably) could be queried > to locate the path name for a desired file. This would be ideal > if people such as MIT could create this for their distributions > of X, or UNIX vendors for their source distributions. Can't help you with the solution you recommend (an indexer), but if you are open to other solutions... Teach the "people in the lab" about the "find" command. You can even make it more convenient for them, by defining an alias: alias dirr 'find . -name \!* -print | sort' which allows them to cd to the root of the tree where the file is known to reside and type: dirr foo.c Encourage them to use it on the smallest tree they know to contain the file because the search is slow. --Fred Fred Stluka Internet: stluka@software.org Software Productivity Consortium UUNET: ...!uunet!software!stluka 2214 Rock Hill Rd, Herndon VA 22070 ----------------------------- From: "Mark J. Bailey" <root@mjbtn.jobsoft.com> Subject: Re: OK, so who runs SVR4 ?? Keywords: V4 Date: 17 Aug 90 00:47:09 GMT To: info-unix@sem.brl.mil In <325@uport.UUCP> rduc@uport.UUCP (Rchard Ducoty) writes: >In article <1990Aug6.121634.176@aim1.uucp> deon@aim1.uucp (Deon Botha) writes: >>From article <736@pcsbst.pcs.com>, by mike@cochise.pcs.com (Mike Schroeder): >>> >>> the subject line really says all: what system vendors/software vendors >>> are supplying SVR4 for _real live_ systems today? >>> If any: who for what system? >============== >Microport is also shipping V4 for 386/486 machines (ISA) >Richard Ducoty >Microport >Scotts Valley, CA >408 438-8649 I have heard a rumor that supposedly (from the electronic grape vine) SCO will ship *SV4.1* (skipping SV4.0) sometime in the first half of next year! I can neither confirm nor shoot that down. When I later mentioned it to an SCO rep, they did not know what I was talking about....hmmmm.... So, as I said, a rumor, for what it is worth. On a related matter, I did lose a client on account of the fact that openly SCO had not announced a SV4.? release. He did not want SV3.2.x. Does anyone know anything regarding SCO and V4? BTW, I am, of course, referring to V4 for 386 and/or 486. Mark. -- Mark J. Bailey, N4XHX "We do our JOB, so you can do yours!" USMAIL: 511 Memorial Blvd., Murfreesboro, TN 37129_______/====X11====\_______ VOICE: +1 615 893 0098 | JobSoft | UUCP: ...!uunet!mjbtn!mjb, ...!raider!mjbtn!mjb | Design & Development Co.| DOMAIN: mjb@mjbtn.JOBSOFT.COM CIS: 76314,160 | Murfreesboro, TN USA | <KA9Q-UNIX-USERS Mailing List-Subscribe: ka9q-unix-requests@mjbtn.jobsoft.com> ----------------------------- From: Jim Earl <jre@sactoh0.sac.ca.us> Subject: Onyx C8002; anyone else have one? Keywords: Need help getting uucp going on this machine Date: 17 Aug 90 01:02:32 GMT To: info-unix@sem.brl.mil I just bought an Onyx C8002 computer. This beast is about 10 years old, and runs Unix System III, version 3.0.4. Just about everything works, except for uucp. cu works fine. But trying uucico to call a system keeps giving me a "NO DEVICE" error, when run with the -x9 debugging parameter. I'm pretty sure I've got my L-devices and L.sys set up correctly (according to a couple of friends who are familiar with system III). The main thing I don't understand is, how can cu work, but not uucico? They both "talk to" the same device. If you have have one of these machines, I'd really like to hear from you. I'd be glad to hear from you even if you don't have one of these machines, but can offer some assistance. -- Jim Earl - KB6KCP / home: (916) 729-6825 work: (916) 929-0300 x233 INTERNET: pacbell!sactoh0!jre@ames.arc.nasa.gov UUCP: {ames | apple | att | sun}!pacbell!sactoh0!jre or: ucbvax!csusac!sactoh0!jre ----------------------------- From: Romain Kang <romain@pyramid.pyramid.com> Subject: no ETXTBUSY in SVr4? Date: 17 Aug 90 01:51:44 GMT To: info-unix@sem.brl.mil $ a.out & [1] 577 $ cp /dev/null a.out [1] + Killed a.out Why? ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: /-happy Date: 17 Aug 90 02:07:05 GMT Sender: news@convex.com To: info-unix@sem.brl.mil In article <1990Aug16.215045.21300@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >| Explain why '/////' is valid in the following statement: >| cd /./../tmp/////../././bin > >The null pathname (look carefully between the consecutive "/"-s, and >you'll see them there) is a valid synonym for the "current directory". Well, only until POSIX, after which a null pathname "" is considered an error and NOT to be a valid synonym for ".". However, this case continues to work because adjacent /'s are to be collapsed in the kernel's path-to- inode routine (possibly lookuppn() or namei() depending on UNIX flavor). --tom -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [Doug Gwyn] ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: /-happy Date: 17 Aug 90 18:57:18 GMT To: info-unix@sem.brl.mil In article <3139@dftsrv.gsfc.nasa.gov> merritt@iris613.gsfc.nasa.gov (John H Merritt) writes: >Explain why '/////' is valid in the following statement: >cd /./../tmp/////../././bin >It is interesting that any permutation of '.', '..', '/' and directory >names can be used with, at least, csh, sh, and tcsh to yield a valid >path name. You're overgeneralizing. Shells, which must necessarily implement "cd" as a built-in instead of invoking a subprocess to do the chdir, sometimes are implemented to keep track internally of the current working directory, especially if they offer a shell variable that expands to the CWD string. As a side-effect of an internal canonicalization of the CWD string, such shells may themselves try to remove . .. and null pathname components. It is not true that the kernel would necessarily accept such a noncanonicalized string as a valid argument to the chdir() system call. All the pathname canonicalization algorithms I've encountered so far have had some undesirable features, such as you mention. I've been working on an improved algorithm, but it's not available yet. Note that there is no way to handle "whatever/foo/.." where "foo" does not exist or is not a directory, without consulting the kernel about it, which is contrary to the whole notion of using pathname canonicalization. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: /-happy Date: 17 Aug 90 18:58:29 GMT To: info-unix@sem.brl.mil In article <1990Aug16.215045.21300@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >The null pathname (look carefully between the consecutive "/"-s, and >you'll see them there) is a valid synonym for the "current directory". No, it isn't, at least for modern UNIX implementations. ----------------------------- From: Gerry Roderick Singleton <gerry@jts.com> Subject: Re: get terminal speed from shell script Date: 17 Aug 90 03:44:01 GMT To: info-unix@sem.brl.mil In article <12584@hydra.gatech.EDU> gt0178a@prism.gatech.EDU (BURNS,JIM) writes: >in article <1990Aug14.181010.29571@jts.com>, gerry@jts.com (Gerry Roderick Singleton ) says: >> #! /bin/sh >> >> speed=`stty speed </dev/tty 2>&1` >> echo $speed > >Nope, on SunOS 4.0, you get: > >{richsun12:/usr} >[196] t=`stty speed </dev/tty 2>&1` >{richsun12:/usr} >[197] echo $t >stty: Operation not supported on socket >{richsun12:/usr} >[198] >-- Hmm, that's true when you're in a window. I did not interpret the original question as being window specific but the more general case of working with ttys and pttys. The script DOES work for real ttys and ti even works on pttys over RPC links. Here's the output under these circumstances as executed with /bin/sh -vx foo, where foo is the four lines above: #! /bin/sh speed=`stty speed </dev/tty 2>&1` + stty speed speed=9600 echo $speed + echo 9600 9600 I have no window system solution, so I hope one of the window system gurus can help. ger -- -- G. Roderick Singleton, System and Network Administrator, JTS Computers {uunet | geac | torsqnt}!gerry@jtsv16.jts.com ----------------------------- From: "BURNS,JIM" <gt0178a@prism.gatech.edu> Subject: Re: get terminal speed from shell script Date: 17 Aug 90 09:22:45 GMT To: info-unix@sem.brl.mil in article <1990Aug17.034401.12720@jts.com>, gerry@jts.com (Gerry Roderick Singleton ) says: > Hmm, that's true when you're in a window. I did not interpret the > original question as being window specific but the more general > case of working with ttys and pttys. The script DOES work for real I was on a 'screen' window on one host, doing an rlogin to the SUN. I was not in a window as far as the Sun was concerned, although rlogin was probably using a socket. This saved me the trouble of being physically at the Sun. Are you saying this is stll justified behavior for the Sun? Rlogin- ing to a Mac A/UX, or even back to my host, does not cause problems w/stty. > ttys and ti even works on pttys over RPC links. Here's the output > under these circumstances as executed with /bin/sh -vx foo, where foo > is the four lines above: > #! /bin/sh > speed=`stty speed </dev/tty 2>&1` > + stty speed > speed=9600 > echo $speed > + echo 9600 > 9600 > I have no window system solution, so I hope one of the window system > gurus can help. The previously posted solutions of speed=`stty speed 3>&1 1>&2 2>&3` or speed=`/usr/5bin/stty speed` work. -- BURNS,JIM Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a Internet: gt0178a@prism.gatech.edu ----------------------------- From: Brian Glendenning <bglenden@mandrill.cv.nrao.edu> Subject: rm delayed? Date: 17 Aug 90 05:33:35 GMT Sender: news@murdoch.acc.virginia.edu To: info-unix@sem.brl.mil Is it ever possible for a shell script snippet like the following: touch /tmp/bad.$$ [...] # Success rm /tmp/bad.$$ [...] if [ -f /tmp/bad.$$] then echo failed exit 1 fi To falsely report failure? This seems to be happening on our system (convex). Is it true that if the rm succeeds it does so immediately, or is it possible that some sort of race can be causing a false apparent failure? I wouldn't have thought so, but I can't quite see where else the script might be going wrong. Thanks! -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286 ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: rm delayed? Date: 17 Aug 90 11:44:05 GMT Sender: news@convex.com To: info-unix@sem.brl.mil In article <BGLENDEN.90Aug17013335@mandrill.cv.nrao.edu> bglenden@mandrill.cv.nrao.edu (Brian Glendenning) writes: > >Is it ever possible for a shell script snippet like the following: > >touch /tmp/bad.$$ >[...] ># Success >rm /tmp/bad.$$ >[...] >if [ -f /tmp/bad.$$] >then > echo failed > exit 1 >fi > >To falsely report failure? This seems to be happening on our system >(convex). Is it true that if the rm succeeds it does so immediately, >or is it possible that some sort of race can be causing a false >apparent failure? I wouldn't have thought so, but I can't quite see >where else the script might be going wrong. Thanks! I've tested this on version 7, 8, 8.1 and 9 of the O/S, and here's what I've found. 1) First of all, you need a space between the $$ and the ] or you get a "test: ] missing" error. 2) Having fixed that, I never get the 'failed' to print, *BUT* on version 7 and 8 of ConvexOS when put in a shell script like this: #!/bin/sh touch /tmp/bad.$$ rm /tmp/bad.$$ if [ -f /tmp/bad.$$ ] then echo failed exit 1 fi The shell script itself returns an exit status of 1. This is a problem that can really screw up your makefiles. Fortunately, it's fixed by version 8.1, so if this is your problem, an upgrade will fix it. --tom -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [Doug Gwyn] ----------------------------- From: Lee Van Dyke <lvandyke@balboa.eng.uci.edu> Subject: AT&T 3B2 computer info wanted before 8/20/90 ::::::::)))) Keywords: AT&T 3b2 computer Date: 17 Aug 90 06:37:32 GMT To: info-unix@sem.brl.mil Does anyone know the general specs. on the AT&T 3B2 ? Thanks in advance if anyone can respond before Monday. Lee Van Dyke lvandyke@balboa.eng.uci.edu ----------------------------- From: Ronald Pikkert <ronald@atcmp.nl> Subject: Re: Changing back slashes to forward slashes Date: 17 Aug 90 08:28:51 GMT To: info-unix@sem.brl.mil From article <1990Aug16.194644.14376@athena.mit.edu>, by ramon@skye.mit.edu (Ramon F Herrera): <> <> I have a question for those {sed, grep, awk, tr} wizards out there. <> #include "dira\dirb\incl.h" <> to <> #include "dira/dirb/incl.h" <> For a real edit-job use a real editor :-) script ------ ed - $1 <<@ g/^#include/s/\\\/\\//g w @ Invoke this script as: "script prog.c" and it will do the job. You can run it without having to worry about creating temporary files, wich you would need with any of the filters you mentioned. Have fun, - Ronald Pikkert E-mail: ronald@atcmp.nl @ AT Computing b.v. Tel: 080 - 566880 Toernooiveld 6525 ED Nijmegen ----------------------------- From: Art Neilson <art@pilikia.pegasus.com> Subject: Re: Changing back slashes to forward slashes Keywords: tr, sed, PC, port Date: 17 Aug 90 10:28:57 GMT To: info-unix@sem.brl.mil In article <1990Aug16.194644.14376@athena.mit.edu> ramon@skye.mit.edu (Ramon F Herrera) writes: > >I have a question for those {sed, grep, awk, tr} wizards out there. >I'd like to change all the occurrences in a file of a line like this: > >#include "dira\dirb\incl.h" > >to > >#include "dira/dirb/incl.h" Gosh, how about this ... sed '/^#include/s/\\/\//g' infile > outfile -- Arthur W. Neilson III | ARPA: art@pilikia.pegasus.com Bank of Hawaii Tech Support | UUCP: uunet!ucsd!nosc!pegasus!pilikia!art ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: Converting to uppercase/lowercase in sed Date: 17 Aug 90 09:33:54 GMT Sender: news@convex.com To: info-unix@sem.brl.mil In article <1990Aug16.232151.23436@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <3766@umbc3.UMBC.EDU>, rostamia@umbc5 writes: >| Is there a way to convert characters to uppercase or to lowercase in sed? > y/a-z/A-Z/ >uppercases the pattern space. You'll have to juggle the pattern and >hold spaces if you want just part of a line uppercased. > >Or get Perl. :-) Yes, the y command is a pain because of not being able to act on just part of a line. But, um, Randal has (understandably :-) been doing so much perl he's attributed perl intelligence to sed, which just isn't so. In sed you really have to do this: y/abcdefghijklmnopqrstuvxyz/ABCDEFGHIJKLMNOPQRSTUVXYZ/ And make sure they match up exactly. --tom -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." [Doug Gwyn] ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Converting to uppercase/lowercase in sed Date: 17 Aug 90 13:09:08 GMT Sender: news@cs.vu.nl To: info-unix@sem.brl.mil In article <1990Aug16.232151.23436@iwarp.intel.com>, merlyn@iwarp.intel.com (Randal Schwartz) writes: )In article <3766@umbc3.UMBC.EDU>, rostamia@umbc5 writes: )| Is there a way to convert characters to uppercase or to lowercase in sed? )| In EX the command )| s/asdf/\U&/ )| changes the string asdf to ASDF, but ed and sed do not seem to be as )| sophisticated as ex :-( )| )| Any ideas? ) )yeah, the not very well documented "y" command. ) ) y/a-z/A-Z/ Doesn't work on SunOS 4.0.3c and a whole lotta other UNIX versions. :-( y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ POSIX had better fix this... -- "UNIX was never designed to keep people from doing stupid things, because that policy would also keep them from doing clever things." (Doug Gwyn) ----------------------------- From: Randal Schwartz <merlyn@iwarp.intel.com> Subject: Re: Converting to uppercase/lowercase in sed Date: 17 Aug 90 21:18:42 GMT Sender: news@iwarp.intel.com To: info-unix@sem.brl.mil In article <7331@star.cs.vu.nl>, maart@cs (Maarten Litmaath) writes: | )yeah, the not very well documented "y" command. | ) | ) y/a-z/A-Z/ | | Doesn't work on SunOS 4.0.3c and a whole lotta other UNIX versions. :-( | | y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ | | POSIX had better fix this... Hmm, it would have worked *after* being fed through the sed-to-Perl translator... :-) Shows you how much *I've* used that in sed. Just another (former) sed hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/ ----------------------------- From: Chris Elvin <celvin@ee.surrey.ac.uk> Subject: European X windows User Group Conference Date: 17 Aug 90 10:41:43 GMT Sender: news@ee.surrey.ac.uk To: info-unix@sem.brl.mil EXUG Conference and Exhibition X into the future Guilford Surrey UK 24th-26th September 1990 The first residential conference of the European X user Group will take place at Surrey University, Guilford UK on 24-26th September 1990. A major Exhibition is being held in conjunction with the conference. This gives vendors the opportunity to show and sell their products and services, and allow users to keep up to date with the commercial market Conference ========== Speakers include: Jim Gettys of Digital -- has worked on X and Project Athena since 1984, played a major part in the design of X11: Keynote Speech. Paul Asente of Adobe -- designed and implemented the X toolkit: conducting a tutorial, and describing X Server extensions. Keith Packard of the MIT X Consortium -- use of the X Selections mechanism. Chris Peterson of ICS and formerly of the X Consortium -- a brand-new interactive resouce editing system. Jim Fulton of NCD and formerly of the X Consortium -- implementing X for X terminals Todd Newman of Digital -- worked on implementing the first X server. PLUS papers on X terminals, PEX, user's experiences using X for real applications, X development and tools, aids to porting and migrating non-X programs, graphics tools, etc. etc. Timetable ========= Tutorials & 24 Sept morning Conference & 24 Sept Afternoon -- 26 Sept. Exhibition & 25--26 Sept. BOF's & 24,25 Sept evenings Costs (all costs subject to VAT at 15%) ===== The exhibition is free and open to the public. Guilford is well served by road and rail links and there are car parks at the University We hope to provide a coach service from central London to the University; more details as they become available. Costs include the conference and accomodation Monday and Tuesday night, Evening Meal on Monday, meals on Tuesday and Breakfast Wednesday. Accomodation with Evening meal and breakfast for Sunday and/or Wednesday night is available There will be a conference dinner on Monday 24th September Conference ---------- EXUG members 250 pounds non members 300 pounds Tutorial -------- 100 pounds Extras ------ Accomodation on Monday/Wednesday 30 pounds per night For further information: Tom Yeates EXUG'90 Exhibition Coordinator Digital Equipment Co Ltd Hampshire House Wade Road Basingstoke Hants UK phone +44 256 843 333 fax +44 256 479 457 or EXUG Secretary 185 High Street Cottenham Cambs UK phone +44 954 211 860 fax +44 954 211 244 or Chris Elvin Dept of Elec. Eng University of Surrey Guilford UK phone +44 483 509 104 fax +44 483 34 139 email C.Elvin@ee.surrey.ac.uk -- Chris Elvin C.Elvin@EE.Surrey.Ac.UK "Beware of low flying butterflies!" Dept of Elec. Eng, University of Surrey, Guildford, Surrey, GU2 5XH. England. PHONE: +44 483 509104 FAX: +44 483 34139 ----------------------------- From: Ad Arts <arts@idca.tds.philips.nl> Subject: forecasting, measuring, simulation and modeling tools. Keywords: See subject Date: 17 Aug 90 11:36:10 GMT To: info-unix@sem.brl.mil I'm posting a question in this news group, because I could not find another appropriate group. I would like to know which (CASE ?) tools there are available, which will help, with respect to modeling, measuring, simulating and forecasting, of transaction processing applications on UNIX V.3.2 80x86 platforms. When large applications are developed, the prototypes will not always tell you what is going to happen with system resources, when instead of 10 users, 70 users are starting to use the transaction application/database. System resources/parameters can be memory, number of inodes, required cache buffer size. Transaction application writers also experience that they have written the application in a way that transactions will take much longer as initially was expected. A system analist, with knowledge of the internals of operating system and database, can often modify the transaction application in such a way that the performance is increased with e.g. a factor of 5. I would like to know whether somebody knows of (commercial) applications which really help you to solve the above mentioned problem. Please e-mail responses to: arts@idca.tds.philips.nl Ad Arts. ----------------------------- From: Ray Davis <rdavis@connie.uucp> Subject: Re: Printing with terminalservers Keywords: print terminalserver Date: 17 Aug 90 12:21:45 GMT To: info-unix@sem.brl.mil In <1990Aug16.143007.4690@diku.dk> harbo@diku.dk (Klaus Harbo) writes: >I want to be able to hook up printers on terminalservers, so that >we can place our printers anywhere in the house. I've mailed you a shar file of a program I wrote called tsprintd. It works on a Convex which has 4.3/sun based networking. It also requires named pipes. Should work on Ultrix unless you have no named pipes. If not you should be able to hack it to run differently. The basic networking code to get to the terminal server. It seems to work with most terminal servers, but it depends on the server. Have fun... Ray Davis Convex Computer GmbH, Frankfurt, West Germany unido!connie!rdavis, uunet!convex!rdavis, rdavis@convex.com, +49-69-666-8081 ----------------------------- From: Lee Van Dyke <lvandyke@balboa.eng.uci.edu> Subject: Wanted: ftp sites for c-shell programs Keywords: ftp c-shell Date: 17 Aug 90 15:14:39 GMT To: info-unix@sem.brl.mil Does anyone know of ftp sites containing various c-shell programs? Thanks Lee Van Dyke lvandyke@balboa.eng.uci.edu ----------------------------- From: Peter da Silva <peter@ficc.ferranti.com> Subject: Re: Cshell question: taking wordlists as a single string Date: 17 Aug 90 15:15:51 GMT To: info-unix@sem.brl.mil In article <3251@syma.sussex.ac.uk>, andy@syma.sussex.ac.uk (Andy Clews) writes: > I have a Csh script called "whatnews" ... > foreach i ($*) > Basically, then, can Cshell cope with word-lists as single arguments, or > must I write a C program to do the job (or try sh or ksh?) Try sh (not ksh, unless you don't care about portability: sh is more universally available). By and large, csh is a poor language for writing programs in. Sh is much better. for i do ... done This will properly handle your quoted args. -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com (currently not working) peter@hackercorp.com ----------------------------- From: "Richard C. Dempsey" <lrul00@dixel.kodak.com> Subject: herror(3) Keywords: ftp tahoe Date: 17 Aug 90 15:43:53 GMT Sender: news@eastman.uucp To: info-unix@sem.brl.mil I just pulled over unix/4.3BSD-tahoe/src/network/ftp.tar.Z from wuarchive.wustl.edu. I can't build it because neither my Ultrix system or my SunOS 4.0.3 system have herror(3) in their libraries. What does it do? More importantly, where can I get it? hp = gethostbyname(host); if (hp == NULL) { fprintf(stderr, "ftp: %s: ", host); =====> herror((char *)NULL); code = -1; return((char *) 0); } I speculate that it prints an appropriate error message, like ferror(3S) or perror(3) ... Thanks, -- Richard C. Dempsey dempsey@Kodak.COM Computational Science Laboratory (716) 477-3457 Eastman Kodak Company #include <disclaimer.std> Rochester, NY 14650 ----------------------------- From: Gary Beckmann <beckmann@endor.harvard.edu> Subject: Opening for output on a terminal server (was Printing with terminalservers) Date: 17 Aug 90 15:48:45 GMT Sender: news@husc6.harvard.edu To: info-unix@sem.brl.mil My question is similar, except it has to do with using modems to call out--and the modems are connected to a DECserver200. Right now I have to go through VMS--and this is *very* unpleasant. Any help??? (oh, yeah: I'm on Ultrix 3.1 and 4.0 on VAX and DEC stations, but it seems to me that there should be some standard Unix way of handling this.) -- Gary Beckmann beckmann@das.harvard.edu Disclaimer: This space for sale. Quote: "If winning isn't everything, why keep score?" -- Worf (Quote typed completely from non-error correcting memory. Parity checks, CRC and corrections accepted) ----------------------------- From: Jean Marie Diaz <ambar@ora.com> Subject: Nutshell Handbook on sendmail doesn't exist yet Keywords: O'Reilly nutshell handbook sendmail Date: 17 Aug 90 16:02:44 GMT Sender: news@ora.com Followup-To: comp.mail.sendmail To: info-unix@sem.brl.mil Apparently, something somewhere on the net led people to believe that this book is imminent (we've been getting lots of calls about it). Not so, folks. We do have someone working on the book, but we don't have a publishing date yet. When it's ready, we'll announce it in comp.newprod--look for it there. AMBAR ambar@ora.com uunet!ora!ambar O'Reilly & Associates, Inc. Publishers of Nutshell Handbooks 90 Sherman Street, Cambridge, MA 02140; 617-354-5800 Book Orders => 632 Petaluma Ave, Sebastopol, CA 95472 800-338-NUTS (in CA 800-533-NUTS) FAX 707-829-0104 ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: Re: sort with a tab as separator Date: 17 Aug 90 17:52:07 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil I just figured out that it is my shell that actually translates tabs into spaces. So, now I need a way to quote a tab (no, quotation marks or backslash quoting don't work)... /ivo welch ivo@next.agsm.ucla.edu ----------------------------- From: Anthony Veale <anthony@boulder.colorado.edu> Subject: Adding on to the history mechanism Date: 17 Aug 90 19:47:30 GMT Sender: news@boulder.colorado.edu To: info-unix@sem.brl.mil Hello, world, I have a programming task that I set myself and I need a bit of advice on how to integrate this thing into my environment. Here's a brief on what I want to do. I want to add on to UNIX the only good thing that I have found under VMS. (My work forces my choice of operating system.) Namely, the VMS equivalent of the history mechanism. For those who aren't familiar with it, you type Up- arrows and Down-arrows to scroll through the history list and you can insert and delete characters anywhere on the command line. Now I have a C program that does all but the scrolling through the history list. (It already recognizes the Up- Down-arrows, but I haven't implemented the scrolling.) What I finally want to do is to squeeze this routine in between my keyboard and the shell. (I use csh habitually, but if I could do this generically, so much the better.) Here's a schematic. input --> VMS history --> standard (c)sh input ^^^^^^^^^^^ my program The implication here is that it should be transparent. If I have done my prog- ramming correctly you should be able to never use the VMS history emulation and never even notice that it's there. I mention that because I have partially squeezed it in via a csh script to test things. But part of the UNIX history mechanism is broken. (^ replacements get ignored.) Please only reply by email, since I do NOT read this group often. Anthony Veale' Grad. Student JILA anthony@lyra.colorado.edu (or, if closed, try) UColorado star.stanford.edu!lyra.colorado.edu!anthony Boulder, CO veale@jila.bitnet Anthony Veale' Grad. Student JILA anthony@lyra.colorado.edu (or, if closed, try) UColorado star.stanford.edu!lyra.colorado.edu!anthony Boulder, CO veale@jila.bitnet ----------------------------- From: John Wilber <wilber@sal-sun11.usc.edu> Subject: How do I change the number of lines on my term? Date: 17 Aug 90 19:57:30 GMT Sender: news@chaph.usc.edu Nntp-Posting-Host: sal-sun11.usc.edu To: info-unix@sem.brl.mil I'm having troubles changing the number of lines that the OS thinks I have on my terminal. Normally, I log into my Unix account here remotely, and emulate a vt100 (setenv term vt100), and this works fine. Sometimes, however, I login at an actual workstation, and no matter what I do, I can't make the OS think that I have more than 25 lines on my screen. I am using Sun workstations running Sun OS 4.0.3, and yes I have RTFM'd. I have tried the following commands: setenv term sun setenv term sun-34 What's wrong? Do the terminal parameters only get initialized upon starting up csh? (I'm using csh). Thanks, John wilber@nunki.usc.edu ----------------------------- From: Paul Davis <paul@ncrcam.cambridge.ncr.com> Subject: UNIX System V.3 benchmarks Keywords: unix,SVR3,benchmarks Date: 17 Aug 90 20:12:10 GMT To: info-unix@sem.brl.mil I am trying to obtain a good benchmark suite for Unix System V.3. If anyone knows of any can you email me information which can tell me where to find it. -- Please reply by e-mail if possible. Thanks in advance Paul Davis INTERNET: paul@ncrcam.Cambridge.NCR.COM VOICE: (614) 439-0232 FAX: (614) 439-0532 ----------------------------- From: muru@iris.brown.edu Subject: Automatic notification of file system changes Date: 17 Aug 90 20:50:14 GMT Sender: news@brunix.uucp To: info-unix@sem.brl.mil Could anyone tell me what needs to be done for the following sample scenarios to work on a Sun 4.03 environment? 1) If anyone modifies a file in my home directory, I want a script to be triggered that will make a "diff" of the old and new files? 2) Anytime a directory is opened, closed, or modified or a printer is brought up or down, I want a signal to be sent to my active process to perform "certain actions." Specifically, I will appreciate if anyone can tell me how much changes need to be made at the kernel level, the order of difficulty for a "non-hacker" to make these changes, and pointers to man pages, manuals, or books. Thanks. muru ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: getting the exit value of an exec'd program Date: 17 Aug 90 21:11:54 GMT To: info-unix@sem.brl.mil >Its man page describes the union wait status variable >returned by wait(2) and its variants. (Exact return type also varies >between wait() variants and diff. unices.) Don't waste time with "union wait". BSD isn't *really* different from other UNIX variants; "wait" *really* fills in an "int", not a "union wait *". (If you don't believe me, check out the kernel code that implements "wait" - it fills in "u_rval2", which is an "int", with the exit status.) "union wait" is just a hack that gives the individual bits of the "int" individual names; unfortunately, it does that with bit fields, which are C-implementation-dependent, while the actual bits are C-implementation-*in*dependent. If you write code not using "union wait", it'll work just fine on BSD systems - and even pass "lint" in 4.4BSD, although not in earlier releases, because POSIX says it's an "int", period. It'll also work on systems that lack "union wait", e.g. vanilla S5 (at least prior to S5R4; they may have stuck in "/usr/ucbinclude/sys/wait.h" in S5R4 to make it easier to recompile BSD programs). If you write code using "union wait", and make it generally available, somebody'll probably try porting it to S5 and have one more porting obstacle to deal with before it works.... ----------------------------- From: "Jeffrey R. Feeley" <jeff@cdin-1.uucp> Subject: Running "The Complete Answering Machine" under DOS emulation Keywords: complete DOS emulation Date: 17 Aug 90 21:59:25 GMT To: info-unix@sem.brl.mil Has anyone tried using the voice mail card made by "The Complete PC" under a DOS emulator such as VP/ix or DOS Merge. SCO informs me that Direct Device Attach (part of SCO Unix or O.D.T.) will work. I don't tend to believe such claims until I hear of or see an actual case. Thanks in advance for your help. PS: Excuse my netiquette if its out of line. This is my first "postnews". E-MAIL (work) ...!uunet!cdin-1!jeff jeff@compu.com phone (800) 223-3282 ----------------------------- From: Brad Appleton <brad@ssd.csd.harris.com> Subject: C-shell variables Date: 17 Aug 90 22:16:14 GMT Sender: news@travis.csd.harris.com To: info-unix@sem.brl.mil I need to have a C shell variable contain a new-line. Apparently I can do this at the shell-prompt using: % set foo=a"\ "b % echo $foo:q a b but the following does not work: % set foo=a\ b % echo $foo:q a Regardless, I am required to put my variable setting in a file named "tmp" and set the variable using: % eval `cat tmp` where "tmp" contains the command to set the variable foo! Unfortunately, what worked at the shell prompt does not seem to work when I put it in a file and use eval (regardless of whether or not I use backslashes). ??? SO what must I put into "tmp" to get a newline into $foo:q ??? Please dont post solutions that dont use "eval `cat file`"; such solutions will be of no use to me. Please dont tell me not to use csh either; I dont usually but in this particular case it is part of my requirements-spec. To make matters worse, I cant go translating all newlines in "tmp" to something else (and then back again) because there may be other variable settings in "tmp" which may be terminated by a newline (and/or a semicolon). This one is giving me a lot of grief because I was hoping that what works on the command-line would work in "tmp" (which doesnt seem to be the case for my csh anyway). PS - If youre curious, the reason I have to deal with all the above is that I have a program that will be taking input and spitting out C-shell variable settings. The only character I cant seem to preserve from the input is the newline character. advTHANXance ______________________ "And miles to go before I sleep." ______________________ Brad Appleton brad@travis.ssd.csd.harris.com Harris Computer Systems ...!uunet!hcx1!brad Fort Lauderdale, FL USA ~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~ ----------------------------- From: Jim Morris <morris@dms.uucp> Subject: /dev/ptmx, granpt(), ptsname() etc .. HELP Keywords: ptmx help Date: 17 Aug 90 23:06:24 GMT To: info-unix@sem.brl.mil Can someone point me at where I can find docs for the ptmx device driver and the various support routines like grantpt(), ptsname() and unlockpt(). I would like to understand how X11R4 is talking to its local server on a system configured for STREAMSCONN and att. Thanks Jim. -- Jim Morris. {motcsd|weitek}!dms!morris or morris@dms.UUCP Voice (408) 434-3798 Atari Games Corporation, 675 Sycamore Drive, Milpitas CA 95035 USA (Arcade Video Game Manufacturer, NOT Atari Corp. ST manufacturer). ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@sandia.gov (SMTP MAILER) (08/22/90)
----Reason for mail failure follows---- Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : Could not be delivered for three days. ----Transcript of message follows---- Date: 19 Aug 90 05:22:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#121 To: "jnjortn" <jnjortn@ceratiidae.cs.sandia.gov> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Sun, 19 Aug 90 05:14:44 MDT Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab18802; 19 Aug 90 5:57 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa18786; 19 Aug 90 5:45 EDT Date: Sun, 19 Aug 90 05:45:27 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#121 Message-ID: <9008190545.aa18786@SEM.BRL.MIL> INFO-UNIX Digest Sun, 19 Aug 1990 V10#121 Today's Topics: Minix UUCP/MAIL Permissions Re: get terminal speed from shell script sh -c /usr/ucb/csh -c SCRIPT causes sys ?degradation? Re: Converting to uppercase/lowercase in sed Funny kill -9 behaviour Re: Funny kill -9 behaviour Re: Recursion without -R Re: 8mm Reliability Thanks for the info on mailx docs. Re: non-interactine telnet session USENIX FaceSaver pix Re: extracting files from a tar file Re: Mail Delivery Problem Re: Adding on to the history mechanism How to flush tty input (was Re: Problems with DIGIBOARD PC/4) Re: sort with a tab as separator style, diction: anyone use them ----------------------------------------------------------------- From: Phi-Ho Hoang <root@insearch.cam.org> Subject: Minix UUCP/MAIL Permissions Date: 15 Aug 90 18:52:01 GMT Return-Path: <InSearch.CAM.ORG!root> X-Mailer: W-MAIL 3.4/MINIX (05/14/90) To: info-unix@sem.brl.mil Hi, I am trying to set up UUCP under Minix. I have been using uucico manually to send and receive mail because when I put uucico in crontab, lmail complains about permission problem and the result is that the mail box is always empty. Anything received in /usr/spool/uucp is just deleted. Please email me a typical setting of modes, ownerships, setuid's and setgid's for the files and directories in use for UUCP and MAIL. Thank you in advance. Phi-Ho Hoang. ----- root@InSearch.CAM.ORG InSearch - For a better Solution uunet!philmtl!altitude!InSearch.CAM.ORG!root ----------------------------- From: Paul Lew <lew@gsg.uucp> Subject: Re: get terminal speed from shell script Date: 16 Aug 90 00:43:03 GMT To: info-unix@sem.brl.mil bob@wyse.wyse.com (Bob McGowen x4312 dept208) writes: >In article <90Aug12.135618edt.18763@me.utoronto.ca> sun@hammer.me.UUCP (Andy Sun Anu-guest) writes: > >Is there a way to get the terminal speed from a (sh or csh) script? >Of course, this is the Bourne shell, not csh. I cannot vouch for how or if >this is possible with csh. Try: set speed = `(stty speed > /dev/tty) |& cat` Layers of I/O redirections usually can solve these kind of problems. -- Paul Lew (lew@gsg.gsg.com) UUCP: oliveb---+ uunet---samsung--+ General Systems Group, 5 Manor Parkway harvard--+--gsg--lew Salem, NH 03079 (603) 893-1000 decvax---+ ----------------------------- From: Paul Gladden <paulg@smokey.sandiego.ncr.com> Subject: sh -c /usr/ucb/csh -c SCRIPT causes sys ?degradation? Date: 17 Aug 90 16:36:08 GMT Sender: news@iss-rb.sandiego.ncr.com To: info-unix@sem.brl.mil We are currently developing a application monitoring daemon. When the daemon detects various application milestones it takes an appropriate action. One potential action is to execute a user supplied shell script. I constructed a two line shell script to log the execution into a log file. Problem is the shell script executes for minutes. Several shell scripts executing cause system performance to nose dive. The daemon executes the shell script via a fork() and system() function call. We were prepending the user defined shell from $SHELL into the system() call ie. system("-c \"/usr/ucb/csh -c SCRIPT arg1 arg2 arg3 arc4\"");. I removed the user shell from being passed to the system() function. This masks the problem, not solving the root cause. The shell script: echo `date` >> test.log echo "SMFsh: process action.\n Info = \"$*\"\n" >> test.log The processes in ?error? are preceded by '>' paulg 665 593 0 11:47:22 ttyx013 1:07 stress -c10000 root 661 1 0 11:46:14 ? 1:03 /etc/sysmond paulg 769 661 0 11:54:44 ? 0:00 /etc/sysmond paulg 689 661 0 11:47:53 ? 0:00 /etc/sysmond paulg 690 689 0 11:47:53 ? 0:00 sh -c /usr/ucb/csh -c "./SMFsh / > paulg 691 690 1 11:47:53 ? 0:34 /usr/ucb/csh -c ./SMFsh /test/na paulg 770 769 0 11:54:48 ? 0:00 sh -c /usr/ucb/csh -c "./SMFsh / > paulg 771 770 0 11:54:49 ? 0:55 /usr/ucb/csh -c ./SMFsh /test/na paulg 703 661 0 11:48:13 ? 0:00 /etc/sysmond paulg 704 703 0 11:48:13 ? 0:00 sh -c /usr/ucb/csh -c "./SMFsh / > paulg 705 704 0 11:48:13 ? 0:53 /usr/ucb/csh -c ./SMFsh /test/na paulg 734 661 0 11:49:28 ? 0:00 /etc/sysmond paulg 736 734 0 11:49:28 ? 0:00 sh -c /usr/ucb/csh -c "./SMFsh / > paulg 737 736 1 11:49:30 ? 2:16 /usr/ucb/csh -c ./SMFsh /test/na system: MC680020 Unix 5.3 1. What would cause a two line shell to execute for an excessive period of time? 2. Has anyone encountered this problem before? Paul Gladden NCR CORPORATION E&M San Diego paulg@smokey.sandiego.ncr.com 16650 West Bernardo Drive ucsd!ivory!smokey!paulg San Diego, Ca. 92128 (619) 485-2716 #include <std/disclaimer.h> ----------------------------- From: Dan_Jacobson@att.com Subject: Re: Converting to uppercase/lowercase in sed Date: 17 Aug 90 22:03:08 GMT Sender: Dan Jacobson <danj1@cbnewse.att.com> To: info-unix@sem.brl.mil merlyn@iwarp.intel.com (Randal Schwartz) writes: >yeah, the not very well documented "y" command. > y/a-z/A-Z/ bzzzzt. Minus 10 points! got to say: y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ -- Dan_Jacobson@ATT.COM +1-708-979-6364 ----------------------------- From: Jim Harkins <jharkins@sagpd1.uucp> Subject: Funny kill -9 behaviour Date: 17 Aug 90 23:37:48 GMT To: info-unix@sem.brl.mil Due to inattention on my part I managed to create a bunch of processes I needed to kill. Rather than typing 'kill -9 number-list', I tried: kill -9 `ps -aug | grep ekg | awk '{print $2}'` To which I was rewarded with `ps -aug | grep ekg | awk '{print $2}'`: ambiguous. After playing around a bit I realized the problem lay with the kill -9, by replacing it with echo I got a list of process numbers. I redirected the ps ... awk output into foo, then tried kill -9 `cat foo` and got `cat foo`: ambiguous. What I want to know is why in the hay does this happen? FYI, I killed the turkeys with a foreach i (`cat foo`) loop in which I kill -9'd the $i's. Also, I'm on a Sun running 4.3 bsd. -- jim jharkins@sagpd1 Iraqnophobia! The talk of the Middle East. Coming soon to a theatre of war near you. ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: Re: Funny kill -9 behaviour Date: 18 Aug 90 21:27:07 GMT To: info-unix@sem.brl.mil >What I want to know is why in the hay does this happen? Because the C shell is flakier than a snowstorm. To quote the BUGS section of the SunOS 4.0.3 manual page (this quote is also in the S5R4 "csh" manual page): Although robust enough for general use, adventures into the esoteric periphery of the C shell may reveal unexpected quirks. which translates as "the C shell is flakier than a snowstorm." Try doing "/usr/bin/kill `cat /tmp/foo`" instead. "kill" is a C shell builtin; somehow, for *some* but not *all* builtins, that construct seems to confuse the shell. Using the non-built-in "kill" seemed to make the problem go away, at least when I tried it. ----------------------------- From: Chris Torek <chris@mimsy.umd.edu> Subject: Re: Funny kill -9 behaviour Date: 18 Aug 90 23:11:28 GMT To: info-unix@sem.brl.mil In various articles various people ask why kill -9 `some expression` produces `some expression`: Ambiguous The reason is that kill is a C-shell built-in, these people are using the C-shell, and the C-shell is (to an amazingly large extent, given that it `works' for most uses) quite thoroughly broken inside. The kill code expands the backquote expression, finds that it breaks into several words, and complains (instead of iterating over each of the words). This does not happen with kill -9 several words because here the expansion occurs before the built-in kill function. Note that kill *must* be a built-in, since `kill %2' has to convert the `%2' to a `job' (and %n does not normally expand to a list of process IDs, which is the obvious way to do this without a built-in). So: workarounds: eval kill arguments `expression` /bin/kill arguments `expression` The latter runs one more process, does not interpret `%'s, and is dependent on the location of the `kill' program. The former simply causes the backquote expression to be expanded before calling the internal `kill' routine. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris (New campus phone system, active sometime soon: +1 301 405 2750) ----------------------------- From: Stefan Hauser <etienne@accsys.ccs.imp.com> Subject: Re: Recursion without -R Keywords: recursion Date: 17 Aug 90 23:51:52 GMT To: info-unix@sem.brl.mil In article <13595@ulysses.att.com> swfc@ulysses.att.com (Shu-Wie F Chen) writes: >In article <494@llnl.LLNL.GOV>, rjshaw@ramius.ocf.llnl.gov (Robert Shaw) >writes: >|>What are some quick tricks for getting programs like chmod and chown to >|>descend into all subdirectories? Programs without a -R option, that is. >>find . -print | xargs chown foo how about : find . -exec chown foo {} \; i think that should work on all systems, or not ? stefan -- Stefan Hauser | CH-Sargans | EMAIL : etienne@accsys.ccs.imp.com ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: Re: 8mm Reliability Date: 18 Aug 90 07:06:31 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil In article <1990Aug16.161652.21233@tijc02.uucp>, cgh018@tijc02.uucp (Calvin Hayden x2254) writes... >How do they compare to 1/2" 9 track, or 1/4" QIC for a purpose >such as this. I also missed the discussion, and am interested in this issue. How probable is it that at least one bit is lost irrecoverably after 2 years from a whole tape? How do the 8mm tapes compare to DAT tapes? And what is the best price/source for either? Thanks for any notes... /ivo welch ivo@next.agsm.ucla.edu ----------------------------- From: Jeff Stuart <jstuart@kentvax.kent.edu> Subject: Thanks for the info on mailx docs. Date: 18 Aug 90 07:42:00 GMT Sender: jstuart@kentvax.kent.edu Distribtion: world To: info-unix@sem.brl.mil Thanks everyone for the info on mailx. If anyone is interested let me know and I'll send you a summary through email. Jeff Stuart Internet: kentba!jstuart@math-cs.kent.edu Kent State University UUCP : uunet!teleng!telxon!kentba!jstuart Kent, Ohio 44449 (216) 672-3282 #include std.disclaimer -- Jeff Stuart Internet: kentba!jstuart@math-cs.kent.edu Kent State University UUCP : uunet!teleng!telxon!kentba!jstuart Kent, Ohio 44449 (216) 672-3282 #include std.disclaimer ----------------------------- From: WATANABE Katsuhiro <katsu@sra.co.jp> Subject: Re: non-interactine telnet session Date: 18 Aug 90 08:57:59 GMT Sender: news@sran124.sra.co.jp To: info-unix@sem.brl.mil In article <1995@xn.LL.MIT.EDU> healey@XN.LL.MIT.EDU (Joseph T. Healey) writes: > Is there any way to invoke a non-interactive telnet session > via a script (preferably csh or sh) ? > > We would like the script to: > > log into the target machine > run an arbitrary number of commands listed in the script > log out of the target machine If we are able to pipe from/into "telnet", you know the rest. When you send command-lines to telnet(to shell of remote site) through pipe, time intervals need to be put between the lines. Naturally, we should wait for prompts. But it is too hard to do in sh/csh. So... how about sleeping? #!/bin/sh remotehost="srava" loginname="katsu" password="neverpeek" (sleep 10 echo "$loginname"; sleep 2 echo "$password"; sleep 10 echo "date"; sleep 2 echo "ls -l"; sleep 3 echo "bc"; sleep 1 echo "for (i = 0; i < 100; i++) j = i * i"; sleep 1 echo "j"; sleep 1 echo "quit"; sleep 1 echo "exit") | telnet "$remotehost" You may add other pipes to last line. Caution: 1. I strongly discourage from using script like this, because it contains the password as plain text. You ought to rewrite it to ask password each start up time, if possible. 2. There is no assurance that it works every time. For example, the first sleeping interval(`sleep 10' in my example) was too short to come up login prompt, it would fail to login. Anyway, it is tiresome to tune intervals after each command invoking. ----____----____ WATANABE Katsuhiro Software Research Associates, Inc. Japan. Not execute, but evaluate. ----------------------------- From: Robert Shaw <rjshaw@ramius.ocf.llnl.gov> Subject: USENIX FaceSaver pix Date: 18 Aug 90 12:19:04 GMT Sender: usenet@llnl.llnl.gov To: info-unix@sem.brl.mil Hello, USENIX types... Are the FaceSaver pictures from the last conference (Anaheim) on the net yet? I can't find myself in faces/<my-hostname>.... <my-hostname> ::= lll-lcc.llnl.gov Just in case somewhere out there knows a secret place to look for shaw.Z Thanx... =============================================================================== rjshaw@ramius.llnl.gov _____ ____ ____ ______ R o b / / / / / / / / / / / -------- / --/ / / / / / / / / / --------------------------- /-- / / / / / / / / S h a w /____/ /_/_/ /_/_/ /_____/ The Cosby's are precisely what's wrong with television today... =============================================================================== ----------------------------- From: "Deven T. Corzine" <deven@rpi.edu> Subject: Re: extracting files from a tar file Date: 18 Aug 90 16:13:35 GMT To: info-unix@sem.brl.mil > I have a faculty member who has brought a tape with him from a > different site. It is a tar tape and the files were stored using > absolute pathnames. The difficulty is that we don't have the same > file structure names and so when I would try to restore the files, > it fills up the root file structure quickly (we don't keep a whole > lot of space available in that partition). > I was wondering if there are any PD programs that exist or whether > someone has written a script to get around this problem. I could > write a script to extract a file at a time and then move it but its > a hassle trying to maintain the directory structure that the faculty > member has and preserve modification dates. I've also considered > writing a C program using the chroot function and doing a system > call to tar but that seems messy too. Yes, I have written a Perl script to do exactly this. It uses the chroot(2) call, and must run setuid root, but it will setuid back to the real uid after performing the chroot. It appears fairly secure, and it does work. The only real thing you need to be sure of is that tar(1) will run standalone, with NO system libraries available. I wrote and tested the script under SunOS 4.0.3 using Perl 3.0; Sun's /bin/tar does indeed work standalone (doesn't need the shared libraries) so it works. If you have a dynamically compiled one, you might have to statically link it for it to work. The suidperl program is needed to execute the script, but it is in memory when running, so it doesn't need the ability to run standalone. Enough caveats; here's the script. [Can anyone think of a good name for it?] ---- #!/usr/local/bin/suidperl if ($#ARGV != 1) { print STDERR "Usage: $0 <tarfile> <dir>\n"; exit 1; } $ENV{'PATH'} = '/bin:/usr/bin'; $tar = $ARGV[0]; $ARGV[1] =~ /(\w+)$/; $dir = $1; if (! -f $tar) { print STDERR "Error: tar file does not exist.\n"; exit 1; } if (-e $dir) { print STDERR "Error: directory must not exist.\n"; exit 1; } if (! -W ".") { print STDERR "Error: No write permission on current directory.\n"; exit 1; } mkdir($dir,0777); chown $<,$(,$dir; system "/bin/cp","/bin/tar",$dir; system "/bin/cp",$tar,"$dir/absolute.tar"; chdir $dir; chroot "."; ($>,$)) = ($<,$(); system "./tar","-xvf","absolute.tar"; unlink "tar"; unlink "absolute.tar"; exit 0; ---- Have fun. Deven -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2214 12th St. Apt. 2, Troy, NY 12180 Phone: (518) 271-0750 Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible. -- Deven T. Corzine Internet: deven@rpi.edu, shadow@pawl.rpi.edu Snail: 2214 12th St. Apt. 2, Troy, NY 12180 Phone: (518) 271-0750 Bitnet: deven@rpitsmts, userfxb6@rpitsmts UUCP: uunet!rpi!deven Simple things should be simple and complex things should be possible. ----------------------------- From: "Alan H. Mintz" <alan@mq.uucp> Subject: Re: Mail Delivery Problem Date: 18 Aug 90 21:43:40 GMT To: info-unix@sem.brl.mil In article <24208@adm.BRL.MIL>, postmaster@sandia.gov (SMTP MAILER) writes: > > ----Reason for mail failure follows---- > Sending mail to <jnjortn@ceratiidae.cs.sandia.gov> : > Could not be delivered for three days. > > ----Transcript of message follows---- ...followed by a trace and a copy of INFO-UNIX digest. Am I missing something or should this bounce back to BRL.MIL, not this group ? Seems like we see this a couple times a month. -- < Alan H. Mintz | Voice +1 714 980 1034 > < Micro-Quick Systems, Inc. | FAX +1 714 944 3995 > < 10384 Hillside Road | uucp: ...!uunet!mq!alan > < Alta Loma, CA 91701 USA | Internet: alan@MQ.COM > ----------------------------- From: Art Neilson <art@pilikia.pegasus.com> Subject: Re: Adding on to the history mechanism Date: 18 Aug 90 19:40:16 GMT To: info-unix@sem.brl.mil In article <24882@boulder.Colorado.EDU> anthony@lyra.Colorado.EDU (Anthony Veale) writes: >Hello, world, > >I have a programming task that I set myself and I need a bit of advice on how >to integrate this thing into my environment. Here's a brief on what I want to >do. > >I want to add on to UNIX the only good thing that I have found under VMS. >(My work forces my choice of operating system.) Namely, the VMS equivalent of >the history mechanism. For those who aren't familiar with it, you type Up- >arrows and Down-arrows to scroll through the history list and you can insert >and delete characters anywhere on the command line. Gee, sounds like ksh, or tcsh, or bash ... There *really* are shells available which do command line editing. Why not just get one of them ??? -- Arthur W. Neilson III | ARPA: art@pilikia.pegasus.com Bank of Hawaii Tech Support | UUCP: uunet!ucsd!nosc!pegasus!pilikia!art ----------------------------- From: Guy Harris <guy@auspex.auspex.com> Subject: How to flush tty input (was Re: Problems with DIGIBOARD PC/4) Date: 18 Aug 90 22:02:05 GMT Followup-To: comp.unix.questions To: info-unix@sem.brl.mil (Generic UNIX issue, not Xenix-specific) >On a related topic, is there anyway to flush typeahead in Xenix?? I am >using the Xenix equivalent of cbreak() (by setting various flags with >ioctl()). fflush(stdin) doesn't seem to work, although it doesn't return >an error code. The term "flush" has, unfortunately, (at least) a couple of meanings. (We shall ignore those such as "a hand of cards of the same suit", for instance. :-)) It's used to mean "taking all buffered output on an output stream - i.e., output that's been buffered up but not written to the file or device - and writing it to the file or device". It's also used to mean "taking all buffered input on an input stream and throwing it away". The first of those two meanings is the meaning of "flush" in "fflush". *Some* C implementations will give it the second meaning in some sense (S5R3 and some or all earlier S5 releases, I think), but others don't (BSD). The ANSI C spec doesn't specify that, and older C language "specifications" didn't either. In addition, in the S5R3 implementation (and probably others that use it to throw away input), it only throws away input that the C buffered I/O routines (sometimes called the "standard I/O library") have buffered, *NOT* input that, say, a device driver has buffered. To throw away input that the terminal driver has buffered, you can, in newer UNIXes, do: ioctl(fd, TCFLSH, 0) where "fd" is the file descriptor for the terminal. In this case, you can do either "fileno(stdin)", or just 0 (which is almost certainly the result of "fileno(stdin)", although if you work hard enough I think you can make it non-zero - you probably haven't had any reason to do that, though). In older UNIXes, you may be able to use the TIOCFLUSH "ioctl", or may have to do a TIOCGETP "ioctl" followed by a TIOCSETP "ioctl" with the state from TIOCGETP. If your Xenix is other than a creaky old one, it should have TCFLSH, though. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: sort with a tab as separator Date: 19 Aug 90 02:22:15 GMT To: info-unix@sem.brl.mil In article <1990Aug17.185300.159@midway.uchicago.edu> phd_ivo@gsbacd.uchicago.edu writes: >I just figured out that it is my shell that actually translates tabs into >spaces. So, now I need a way to quote a tab (no, quotation marks or >backslash quoting don't work)... So get a real shell: $ echo ' ' | od -c 0000000 \t \n 0000002 $ ----------------------------- From: phd_ivo@gsbvxb.uchicago.edu Subject: Re: sort with a tab as separator Date: 19 Aug 90 04:09:28 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil In article <13617@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes... +So get a real shell: + $ echo ' ' | od -c + 0000000 \t \n On a NeXT improved csh (and presumably on some other shells), the following works: sort -t\^V^I that is, the tab must be quoted twice: once with the backslash, and then with the ^V (control-V) to not substitute spaces. Once you know this, it is no big deal, of course. /ivo welch ivo@next.agsm.ucla.edu ----------------------------- From: "Richard L. Goerwitz" <goer@quads.uchicago.edu> Subject: style, diction: anyone use them Date: 19 Aug 90 04:41:50 GMT Sender: News Administrator <news@midway.uchicago.edu> To: info-unix@sem.brl.mil Does anyone actually use style and diction. Diction has a nice little display, and allows easy fix-ups. The dict.d file, though, could be extended in a number of ways (does anyone have a good dict.d file?). Style, though, seems only to report opaque word- lengths, and various statistics on parts of speech and sentence- type. In terms of basic, Strunk & White-type help with writing, it seems to be of minimal use. I wonder: Has anyone actually gotten some good mileage out of style? If so, could he or she perhaps offer some guidance? -Richard ----------------------------- End of INFO-UNIX Digest ***********************
postmaster@[unknown] (SMTP MAILER) (08/29/90)
----Reason for mail failure follows---- Sending mail to host ise.ncsl.nist.gov : Unrecognized host name or address. ----Transcript of message follows---- Date: 27 Aug 90 13:20:00 GMT+109:13 From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V10#129 To: "barkley" <barkley@ise.ncsl.nist.gov> Return-Path: <unixinfo-request@ecf.ncsl.nist.gov> Received: from SEM.BRL.MIL by ecf.ncsl.nist.gov with SMTP ; Mon, 27 Aug 90 13:20:10 EST Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab02920; 27 Aug 90 5:55 EDT Received: from sem.brl.mil by SEM.BRL.MIL id aa02902; 27 Aug 90 5:45 EDT Date: Mon, 27 Aug 90 05:45:22 EST From: The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL> To: INFO-UNIX@BRL.MIL Reply-To: INFO-UNIX@BRL.MIL Subject: INFO-UNIX Digest V10#129 Message-ID: <9008270545.aa02902@SEM.BRL.MIL> INFO-UNIX Digest Mon, 27 Aug 1990 V10#129 Today's Topics: WordStar-like Editor for Unix Wanted Re: Curses and the arrow keys CD-ROM device drivers needed Does PMAX Ultrix 4.0 cc *fully* support void pointers? Re: ATT Unix millisec clock Re: ct for BSD machine... Re: Curses and the arrow keys help: cron runs commands twice (is it timed's fault?) spell and /usr/dict/words. mysteriously full root partition ----------------------------------------------------------------- From: "raymond.konopka..jr" <konopka@cbnewsk.att.com> Subject: WordStar-like Editor for Unix Wanted Date: 24 Aug 90 17:07:46 GMT Sender: "Ray Konopka"@cbnewsk.att.com, Jr@cbnewsk.att.com Followup-To: konopka@ihlpm.att.com To: info-unix@sem.brl.mil I would like to know if there exists a WordStar-like editor available for use on a Unix system. I have programmed in a PC environment for some time know using Borland's Turbo Pascal and Turbo C/C++ and have just moved to a Unix environment. I like the editors used by Borland which are based on WordStar, and I am trying to find one available for a Unix environment. Any information would be appreciated. Thanks, Ray Konopka ----------------------------- From: Mike Jetzer <jetzer@studsys.mu.edu> Subject: Re: Curses and the arrow keys Date: 26 Aug 90 18:52:18 GMT To: info-unix@sem.brl.mil In article <1990Aug24.175453.4310@irscscm.UUCP> mlake@irscscm.UUCP (Marshall Lake) writes: >I am writing a program which will be taking advantage of curses. [ . . . ] >I am doing a getch () and if I get an ESCAPE I do >another getch (). If I addch () for each character I get (the ESCAPE >and the next character) then the cursor moves around properly on the >screen but the x/y coordinates in the window structure do not follow >suit. Curses is recognizing the arrow keys simply as regular >characters. Am I naive in thinking that curses is smart enough to >handle the arrow keys specially? Should I be moving the cursor >manually via the move function? Your naivete could be corrected by reading the manpage on curses. Performing a keypad() will enable the keypad on most terminals, and when the user presses an arrow key, the return value will be KEY_DOWN, KEY_UP, etc. You can then take the proper action based on the key that the user actually pressed. -- Mike Jetzer "And we'll have fun, fun, fun until Daddy takes the keyboard awa-ay..." ----------------------------- From: Michael Meissner <meissner@osf.org> Subject: Re: Curses and the arrow keys Date: 26 Aug 90 21:32:07 GMT Sender: news@osf.org To: info-unix@sem.brl.mil In article <1990Aug24.175453.4310@irscscm.UUCP> mlake@irscscm.UUCP (Marshall Lake) writes: | I am writing a program which will be taking advantage of curses. I am | trying to utilize the arrow keys and am confused (actually all of | curses confuses me). I am doing a getch () and if I get an ESCAPE I do | another getch (). If I addch () for each character I get (the ESCAPE | and the next character) then the cursor moves around properly on the | screen but the x/y coordinates in the window structure do not follow | suit. Curses is recognizing the arrow keys simply as regular | characters. Am I naive in thinking that curses is smart enough to | handle the arrow keys specially? Should I be moving the cursor | manually via the move function? If your curses is based on the System V.2 curses, it will have a 'keypad' function which turns on recognizing any arrow keys or function keys. Here is a copy of the documentation: NAME keypad - enable keypad SYNTAX keypad(win, bf) WINDOW *win; bool bf; DESCRIPTION This option enables the keypad of the user's terminal. If the keypad is enabled, pressing a function key (such as an arrow key) will return a single value representing the function key. For example, pressing the left arrow key results in the value KEY_LEFT being returned.. For more information see the Guide to Curses Screen-Handling. The routine is used to return the character. If the keypad is disabled, does not treat function keys as special keys and the program interprets the escape sequences itself. Keypad layout is terminal dependent; some terminals do not even have a keypad. SEE ALSO getch(3cur) Guide to Curses Screen-Handling Note that KEY_LEFT and friends will not fit in an ordinary character, so make sure getch's result is stored in an int. If your curses is still based on the Berkeley curses, you have my sympathies. This is one area where System V is better than BSD. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Do apple growers tell their kids money doesn't grow on bushes? ----------------------------- From: "E Drew Einhorn ADV.SCI.Inc" <einhorn@hydra.unm.edu> Subject: CD-ROM device drivers needed Date: 26 Aug 90 18:03:52 GMT Sender: USENET News System <usenet@ariel.unm.edu> To: info-unix@sem.brl.mil Anybody know where I can find device drivers to support CD-ROM players on a AT&T 3b2/600 under SYSV version 3.2.2. We have an assortment of players that used to be hooked up to PC's. Thanks, -- einhorn@hydra.unm.edu ----------------------------- From: Scott Weitzenkamp <scott@talarian.uucp> Subject: Does PMAX Ultrix 4.0 cc *fully* support void pointers? Keywords: brain damage Date: 26 Aug 90 22:24:35 GMT Followup-To: comp.unix.ultrix To: info-unix@sem.brl.mil We have a DECstation 3100 with Ultrix 3.0. One of the bugs in cc is that it does not have complete support for void pointers. For example, the following code will *not* compile: int foo(void *ptr) { printf("%d\n", ptr); } Is this bug fixed in cc on Ultrix 4.0? If not, then why the hell not? Why bother having prototypes and other ANSI features if you don't fully support something as simple (IMHO) as void pointers? Most of the pcc-based cc's that I've come across (SunOS 3.x and 4.x, System V/386 3.2) at least allow void pointers as function parameters. While I'm complaining, does the Ultrix 4.0 cc support the ANSI C "const" keyword? -- Thanks in advance... Scott Weitzenkamp, Talarian Corporation, Mountain View, CA uunet!talarian!scott (415) 965-8050 "Welcome to the late show, starring NULL and void" -- Men At Work ----------------------------- From: the hacker <freiss@nixpbe.uucp> Subject: Re: ATT Unix millisec clock Date: 9 Aug 90 10:18:03 GMT Sender: news@nixpbe.uucp To: info-unix@sem.brl.mil In <13494@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >In article <freiss.649671180@peun33> freiss@nixpbe.UUCP (the hacker) writes: >-So far, only SECOND resolution is permitted through the ATT Unix OS to time >-the elapsed time of a job. Millisecond resolution (or better) accessed >-from a .c executable is desired. I am running ATT Unix Version System 5 >-Version 3.2 on a Motorola 68020 based machine. >-System interrupts? Shell commands? Any solution to this thorny problem would >-be greatly appreciated... >Unfortunately, you have not stated a problem, but rather a desired SOLUTION. >If we knew what the real problem to be solved was, perhaps we could suggest >something helpful. Right :-) ok, what Nick Kawaguchi wants is a) something like a profiler with millisecond resolution to time how long a C-function takes to execute. BTW, thanks to all of you who replied suggesting the times() system call. He uses that now, though something that has a better resolution would be more useful. b) a sleep() call with millisecond or tenth of second resolution. Curses has a napms() function that supposedly does exactly that, but I'm told it is unreliable (i.e. doesn't really nap milliseconds, but 1 / HZ seconds). My guess is it's impossible, but then I'm not very wizardly concerning UN*X. All hints are appreciated. Thanks, -Martin freiss.pad@nixdorf.com ----------------------------- From: Don Libes <libes@cme.nist.gov> Subject: Re: ct for BSD machine... Date: 27 Aug 90 00:36:15 GMT To: info-unix@sem.brl.mil In article <3095@unisoft.UUCP> rembo@unisoft.UUCP (Tony Rems) writes: >I was wondering if anyone out there has ported or written/re-written >a version of ct for a BSD machine. For those who don't know ct >is a dial-back getty program. Specifically, I'm looking for >a copy to run on a Pyramid. Any help or direction anyone can >give me would be appreciated. >P.S. Please send me e-mail as well as posting to the net if you can. Since no one has responded to you at all, I'll point you to a different way of solving the same problem. In my talk at the last USENIX, I showed a 5-line script to do dial-back. I can't repeat the whole talk here but you can read the paper. It has a slightly longer version of the same script with all the details explained. The paper may be ftp'd as pub/expect.ps.Z from durer.cme.nist.gov. If you cannot ftp, you may request email copies by mailing to "library@ cme.nist.gov". The contects of the message should be (no subject line) "send pub/expect.ps.Z". Don Libes libes@cme.nist.gov ...!uunet!cme-durer!libes ----------------------------- From: Kim Christian Madsen <kimcm@diku.dk> Subject: Re: Curses and the arrow keys Date: 26 Aug 90 22:54:07 GMT To: info-unix@sem.brl.mil mlake@irscscm.UUCP (Marshall Lake) writes: >I am writing a program which will be taking advantage of curses. I am >trying to utilize the arrow keys and am confused (actually all of >curses confuses me). I am doing a getch () and if I get an ESCAPE I do >another getch (). If I addch () for each character I get (the ESCAPE >and the next character) then the cursor moves around properly on the >screen but the x/y coordinates in the window structure do not follow >suit. Curses is recognizing the arrow keys simply as regular >characters. Am I naive in thinking that curses is smart enough to >handle the arrow keys specially? Should I be moving the cursor >manually via the move function? >I'm really not sure I know what I'm talking about when it comes to >curses so any help is appreciated. In the following I suppose that you have System V curses, I'm no real expert on BSD curses. The method you're using to catch the arrow-keys will work only if you know exactly what the arrow-keys send, but hopefully they're described properly in your terminfo database, so you could get the information from there and parse it. But a better way to handle this situation is using the following approach (I assume that we're using stdscr (the default window). ... initscr(); /* Enable curses */ keypad(stdscr,TRUE); /* Enable function-keys */ noecho(); /* Do not echo typed input on screen */ ... switch (ch=getch()) { case KEY_DOWN: /* Down arrow pressed */ .... break; case KEY_UP: /* Up arrow pressed */ ... break; case KEY_LEFT: /* Left arrow pressed */ ... break; case KEY_RIGHT: /* Right arrow pressed */ ... break; default: if ((ch & A_CHARTEXT) != ch) /* Function key was pressed */ else /* Normal character read */ break; } This answers your first question, I hope, as for your second question, whether you have to move the cursor manually, after determining that an arrow key has been pressed. The answer is YES! And the reason is obvious, first only you know that it was an arrow key to curses it was only a sequence of characters. Remember that almost every terminal of a different brand has differing escape sequences associated with the function keys (including arrow keys). Another vital reason for curses to expect you to decide what to do when an arrow-key is pressed, is that you might not always want it just to move the cursor on the screen, you might want to bind the functionality of pulling a menu down, when you hit the down arrow and then in the menu using it to go to the next menu item, or you might want another functionality the authors of curses never dreamed about, even in their nightmares, when designing the system. So the bottom line is: Yes you can easily detect when a function key has been pressed, but then you must decide what you want to do with that information. Best Regards Kim Chr. Madsen ----------------------------- From: rainbow <rainbow@altger.uucp> Subject: help: cron runs commands twice (is it timed's fault?) Keywords: cron timed NFS Date: 26 Aug 90 10:56:14 GMT To: info-unix@sem.brl.mil PRELUDE: 1) If this has been subject to the net lately, please write me a short mail. 2) WARNING: If no one can help me further here, I'll post this article to comp.unix.wizards! ;-) The following includes some of my current employers equipment, so I avoid naming any Hard- or Software (forgive me). THE PROBLEM ITSELF: CRON RUNS COMMANDS TWICE We are running a network with about 20 UNIX machines. The networking- software is a NFS-lookalike (based on ethernet,TCP/IP). Now on some machines we have the problem that cron(1M) appears to run some commands twice. For example I have a job that is to be executed once per week, say at friday noon. But then, friday 12:00, cron decides to run my job twice (there are two processes running (different PIDs, of course, but same PPID), I receive two mails and it is logged twice in cron.log). This doesn't happen every friday, nor does it happen on all machines within the network, but unless it does on some. Now an obvious workaround is to have all jobs using some kind of locking machanism (as I have them now), but this is not the kind of solution I am looking for. Up to now, noone could tell me why this silly cron behaves so badly, therefore I decided to post this mail. THE THEORY (OR: DOES CRON REMEBER THE LAST COMMAND IT EXECUTED?): To make it somewhat easier, I already have a theory about what might happen. Even if this is not the reason, it is a possible scenario, that is to be avoided (is it already?). ((Unfortunately I have *absolutely* no UNIX-sourcecode available, so could someone please look up whether cron works the way I believe it to work?)) When cron is running, it wakes up every minute, takes a look at the real-time clock, checks whether there is any work to do, optionally does that work and then puts itself to sleep again. This it probably does using the alarm(2) and pause(2) systemcalls. As far as I know, alarm(2) is implemented the way that it schedules a signal to be sent to the caller in HZ*seconds clockticks. Now this is just what might cause the problem: Everything will work fine, as long as your real-time clock is incremented every HZ clockticks, too. But, as we have all machines *synchronizing their clocks* within our NFS-network, you can't rely on that. On machines that have a faster local clock, it might happen that timed slows down the local clock in order to synchronize it with the others. Therefore a minute might be somewhat longer than 60*HZ clockticks (up to ten percent I think, that were 66*HZ ticks). Now when cron is woken up after 60*HZ clockticks the real-time clock might still show the same time as it did the last time cron woke up. If cron doesn't somehow remember that it already did all scheduled jobs for that time, it will do them once again! THE FINAL QUESTIONS: 1) Has anyone seen the described problem on machines where timed was running? 2) Is this scenario publicly known and solved for a long time? 3) Does timed somehow inform programs like cron about time "changes"? 4) Does cron work that way? Or does it continually sleep until there is some work to be done (this could work on ATT SysV since cron has all necessary tables loaded and could be signaled by crontab(1) or at(1) when someone makes any changes) Or does cron(1M) remember the commands it already started? Please mail me or post your replies to comp.unix.questions. Thanx in advance Joerg (please excuse any mistakes; english is not my native language!) Joerg F. Trinitis Kaerntner Platz 4, 8000 Muenchen 21, West Germany (rainbow@altger.alt.sub.org) BANG: ...uunet!mcvax!unido!altger!rainbow ----------------------------- From: Mike Marcel Jonkmans <mike@cs.vu.nl> Subject: spell and /usr/dict/words. Date: 26 Aug 90 23:57:18 GMT Sender: news@cs.vu.nl To: info-unix@sem.brl.mil Allright I had nothing to do and typed for fun the following : (csh)% spell < /usr/dict/words > error (csh)% cat error belying revisable (csh)% What's so special about belying and revisable ?? -- Mike Jonkmans. (mike@cs.vu.nl) ..!uunet!mcsun!botter!mike ----------------------------- From: Caroline Lambert <caroline@pangea.stanford.edu> Subject: mysteriously full root partition Date: 27 Aug 90 05:47:31 GMT Sender: USENET News System <news@morrow.stanford.edu> To: info-unix@sem.brl.mil I have a root partition on a Sun3 that claims to be 110% full - actually 7739 out of 7751 kbytes used. Using 'ls -l' and 'du' I can account for only 6300 kbytes. I have another Sun3 with an almost identical root partition, which does show only 6300 kbytes used. I have halted the system and rebooted it to do an 'fsck', but it still claims to be 110% full. Has anyone come across something like this before? Any pointers would be appreciated. -- Caroline Lambert Department of Geophysics My employer is not AA6BA Stanford University responsible for my caroline@pangea.Stanford.EDU Stanford, CA 94305 irresponsibilities ----------------------------- End of INFO-UNIX Digest ***********************