MAILER-DAEMON@decwrl.dec.com (Mail Delivery Subsystem) (11/18/89)
----- Transcript of session follows ----- 421 /usr/bin/mail11v3 (decnet)... Deferred: Connection reset by peer during greeting wait with /usr/bin/mail11v3 554 mail11 died because of bus error (10)--requeueing message 554 smtpquit mail11: stat 75 ----- Unsent message follows ----- Received: by decwrl.dec.com; id AA22976; Sat, 18 Nov 89 02:38:57 -0800 Message-Id: <8911181038.AA22976@decwrl.dec.com> Date: 18 Nov 89 04:26:00 MDT From: info-unix@BRL.MIL Subject: INFO-UNIX Digest V8#120 To: "omalley" <omalley@hotair> Return-Path: <incoming-info-unix-request@sandia.gov> Received: from SEM.BRL.MIL by sandia.gov with SMTP ; Sat, 18 Nov 89 02:57:59 MDT Received: from SEM.BRL.MIL by SEM.brl.MIL id ab05754; 18 Nov 89 2:57 EST Received: from sem.brl.mil by SEM.BRL.MIL id aa05726; 18 Nov 89 2:46 EST Date: Sat, 18 Nov 89 02:46:10 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 V8#120 Message-ID: <8911180246.aa05726@SEM.BRL.MIL> INFO-UNIX Digest Sat, 18 Nov 1989 V8#120 Today's Topics: Re: Import variables in to awk. Re: vi editor enhancement request Using "getpwent" in SYSV/386 Re: matrix invert routine Re: Prompt as Current Directory? Re: Import variables in to awk. Re: matrix invert routine Re: vi editor enhancement request Using ftp non-interactively Re: tr Re: Quiet background proc. in CSH Re: export vars from cshell script? Re: vi editor enhancement request Re: Prompt as Current Directory? Re: core files under SV Re: files recovery after rm? Re: Using "getpwent" in SYSV/386 Re: Quiet background proc. in CSH Re: the 10% factor Re: spell..adding new words Re: tr Re: the 10% factor (making swap files) When is GNU OS coming out? Pass environment through rlogin Re: vi editor enhancement request Re: Looking for IEEE Floating Point Test Suite CPU time limit on an entire process group? UNIX conferences in 1990 List? Re: vi editor enhancement request sed libdbm Looking for MUSBUS Changing upper-case filenames to lower-case Re: vi editor enhancement request Can not mail off-site, RTFM not much help Re: export vars from cshell script? Re: vi editor enhancement request ----------------------------------------------------------------- From: Gunter Steinbach <steinbac@hpl-opus.hp.com> Subject: Re: Import variables in to awk. Date: 15 Nov 89 17:22:03 GMT To: info-unix@sem.brl.mil > / hpl-opus:comp.unix.questions / warner@unc.cs.unc.edu (Byron Warner) > / 1:15 pm Nov 14, 1989 / > My questions is how do you import csh variables into an awk script. > [ deleted ] > awk -F: -f foo /etc/passwd import='hello The variable assignment has to come before the input file name. Guenter Steinbach | hplabs!gunter_steinbach | gunter_steinbach@hplabs.hp.com ----------------------------- From: ir239 <ir239@sdcc6.ucsd.edu> Subject: Re: vi editor enhancement request Date: 17 Nov 89 08:27:27 GMT Keywords: vi display emacs To: info-unix@sem.brl.mil In article <7008@pt.cs.cmu.edu> dstewart@fas.ri.cmu.edu (David B Stewart) writes: > >But Don't start telling me all the advantages, I'm sure I've heard >them all from my emacs-fanatic office mate). Any and every 'vi' user has had at least one of these. Oh well, to each his own. >The funniest thing is that when my office mate was forced to install >a new system, he had to learn 'vi' just to be able to set up the system >and install Emacs. So much for Emacs being "universal"! Imagine how much fun he'd have if he couldn't mount his /usr directory -- it's happened, don't laugh. No 'emacs', no 'vi', no 'ex'. THEN he get's to learn 'ed', so he can install 'vi', to ease the pain of installing the "universal" 'emacs'. For the record, I use the available editor with which I am most comfortable. On most systems this is 'vi', but it's not always there. Some "hard-cores" think everyone should start with 'ed' -- so they better understand regular expressions. Some "innovationists" think every new editor should become the de facto standard. Who cares? You can make 'emacs' work like 'vi' and you can "doll-up" 'vi' to look like 'emacs' -- if you know the right tricks. Why bother? Now, if you want to discuss versions of Rogue, or the relative merits of Rogue vs. Hack . . . #include <disclaimer.std.h> Geoffrey R. Walton ir239@sdcc6.ucsd.edu <--for now; new net address under construction a guest of, but no longer affiliated with, the Dept. of Literature Never deny an idiot another opportunity to prove it. ----------------------------- From: Mike Israel <mikei@ctdi.uucp> Subject: Using "getpwent" in SYSV/386 Date: 16 Nov 89 19:36:20 GMT Keywords: C getpwent To: info-unix@sem.brl.mil I have a question regarding the use of the "C" function "getpwent" under AT&T's Unix SYSV/386 Release 3.2. This particular version of Unix stores encrypted passwords in a file called /etc/shadow. The standard /etc/password field for the encrypted password simply contains an 'x'. Using "getpwent" simply retrieves this 'x'. Is there an existing function to access the encrypted password? -- Michael A. Israel || uucp: mikei@ctdi.UUCP || ...!uunet!cbmvax!ctdi1!ctdi Communications Test Design Inc. || West Chester, PA || I think therefore I am confused. ----------------------------- From: Richard O'Keefe <ok@mudla.cs.mu.oz.au> Subject: Re: matrix invert routine Date: 17 Nov 89 10:17:43 GMT Sender: news@cs.mu.oz.au Keywords: TRANSPOSING in the shell To: info-unix@sem.brl.mil In article <6979@convex.UUCP>, tchrist@convex.COM (Tom Christiansen) writes: > This is a nice example of using small, dedicated UNIX tools to do your job. > It is also a good example of why doing this is terribly slow. > Here's [a] perl version. It's bit more general than the sh version > because it doesn't have to be hacked to work for different sized > matrices or different files, but does basically the same thing: [deleted] > This is not a great test because of the resolution. Let's > try it on [a 10 by 10 matrix.] [The result is] more than 7.3x the real, > 1.6x the user, and 22x on system ... on a Convex-C1. ... 'Nuff said. > shell cut 6.6 real 0.8 user 4.4 sys > perl 0.9 real 0.5 user 0.2 sys Not _quite_ enough said. I timed three versions of this in the Bourne shell on a discless Sun-3/50 serving off an Encore. echo `cut` 7.1 real 1.4 user 4.1 sys read|sort|read 2.8 real 0.6 user 1.0 sys read|nsort|read 1.9 real 0.4 user 0.7 sys echo `cut` : the version Christiansen criticised read|sort|read : copy the file as <colno><linemark><item> using a while read ... loop, sort the result using sort(1), flatten the result using another while read ... loop. (Transposing by sorting is old hat, and while read is the standard way to read things in the shell.) read|nsort|read : same as above, except using a faster sort program. Given the difference in I/O systems, we can't compare the times of the two machines. What we _do_ notice is that a different shell program using out-of-the-box SysV stuff ran twice as fast as the version that Christiansen criticised, and that simply plugging in a faster version of one of the standard commands chopped another third off the time. To compare _one_ shell program with _one_ Perl program tells us little about either the shell or about Perl. ----------------------------- From: matt robinson <yakker@ucrmath.ucr.edu> Subject: Re: Prompt as Current Directory? Date: 17 Nov 89 07:46:23 GMT Followup-To: yakker@ucrmath.ucr.edu To: info-unix@sem.brl.mil ==>In article <Nov.16.00.56.12.1989.9985@paul.rutgers.edu> ==>broadman@paul.rutgers.edu (Alan Broadman) writes: ==>How can you get the UNIX prompt to always reflect the path to the ==>current directory. This is our school's method (Recipe #3,402) :-) It also includes the path, username, and current history (for csh.) Hope this helps. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # Setting the Prompt and Changing Directories. set hostname = `hostname` set username = `whoami` set fromname = `who am i | awk '{print $1}' | sed 's/^.*\\\!//'` if ("$fromname" != "$username") then set username="$username"' ('"$fromname"')' endif alias heyyou 'set prompt = "$hostname : $username : `pwd`\\ \! >"' set prompt = "$hostname : $username : `pwd`\ \! >" a cd 'cd \!*;heyyou' a pushd 'pushd \!*;heyyou' a popd 'popd;heyyou' >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< P.S. You should have read the newusers newsgroup before posting this... Makes life easier on all of us. -----------------------*------------------------------------------------------ yakker@ucrmath.ucr.edu | Matt Robinson, University of California at Riverside ..!ucsd!ucrmath!yakker | Department of Mathematics and Computer Science -----------------------*------------------------------------------------------ ----------------------------- From: Rich Scott <richsc@ism780c.isc.com> Subject: Re: Import variables in to awk. Date: 16 Nov 89 16:41:57 GMT To: info-unix@sem.brl.mil In article <15919@bloom-beacon.MIT.EDU> jik@athena.mit.edu (Jonathan I. Kamens) writes: >In article <10531@thorin.cs.unc.edu> warner@unc.cs.unc.edu (Byron Warner) >writes: >>My questions is how do you import csh variables into an awk script. >>for example if I have a file called foo, which contains: >>{ >> print import,$0 >>} >> >>and I issue the command >>awk -F: -f foo /etc/passwd import='hello >>why do I get just a list of logins? Well, apparently awk wants its 'imported' variables specified on the command line *before* the datafile(s), but this isn't obvious from the manual page. Someone here told me that the argument parsing may not be done correctly. Anyway, on my system, which runs SunOS3.5, I get the desired effect (using csh) by doing: awk -F: -f foo import='hello' /etc/passwd (This is running the 4.2 or 4.3 BSD 'awk'; I can't speak for the "new" awk.) > > First of all, I have never known the C-shell to allow the syntax >"foo=bar" on a command-line to import a variable into a program. C >shell doesn't have anything like that. Umm, I don't think it's up to the shell in this case to do anything with it; it's simply an argument to the program. Perhaps Byron, if he really wants to import a C-shell variable into awk, should do: hostname% setenv VAR='hello' hostname% awk -F: -f foo.awk import=$VAR /etc/passwd The first example doesn't set any C-shell variables. ---------------- rich scott rls@i88.isc.com interactive systems corporation voice: (800) LAI-UNIX x255 (formerly lachman associates) naperville, il, usa ----------------------------- From: Tom Christiansen <tchrist@convex.com> Subject: Re: matrix invert routine Date: 10 Nov 89 17:49:16 GMT Sender: usenet@convex.uucp Keywords: perl version Organi~ation: CONVEX Software Development, Richardson, TX To: info-unix@sem.brl.mil In article <1989Nov9.233341.14788@world.std.com> bzs@world.std.com (Barry Shein) writes: |>I have "spreadsheet-like" data that looks like this: |> a1 b1 c1 |> a2 b2 c2 |> a3 b3 c3 |>and I want to get it in a form like: |> a1 a2 a3 |> b1 b2 b3 |> c1 c2 c3 | |Assume you have 3 columns as shown: | | #!/bin/sh | cp /dev/null outfile| for i in 1 2 3 | do | cu| -f$i datafile | tr '\012' '\011' >> outfile | echo '' >> outfmle | end | ed - outfile <<'EOF'| 1,$s/.$// | w| q | EOF I hal to change the &end" to "done" ,too much csl, barry? :-) and add "-d' '" to the cut line to make this work. This is a nice example of using small, dedicated UNIX tools to do your job. It is also a good example of why doing this is terribly slow. Here's the perl version. It's bit more general than the sh version because it doesn't have to be hacked to work for different sized matrices or different files, but does basically the same thing: #!/usr/local/bin/perl $[ = 1; # array should start at 1 not 0 while (<>) { split; $rows++; $cols = $#_ if $#_ > $cols; for ($j = 1; $j <= $#_; $j++) { $matrix{$rows,$j} = $_[$j]; } } for ($i = 1; $i <= $rows; $i++) { for ($j = 1; $j <= $cols; $j++) { print $matrix{$j,$i}, " "; } print "\n"; } Here are the timings for the original dataset. I ran both tests twice to get everything in memory. All timings were run on a Convex-C1. % /bin/time xpose.sh 2.2 real 0.2 user 1.6 sys % /bin/time xpose.perl < mat > outfile 0.4 real 0.0 user 0.2 sys That's of 5.5 times longer on real time, call it twice as long system, and 8 times as long on system for the sh version. This is not a great test because of the resolution. Let's try it on this dataset: % cat mat2 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 Now I'll go hack on xpose.sh to make it work for square matrices of order 10 (and coming from file mat2 not mat) and rerun the timings. % /bin/time xpose.sh 6.6 real 0.8 user 4.4 sys % /bin/time xpose.perl < mat2 > outfile 0.9 real 0.5 user 0.2 sys That's more than 7.3x the real, 1.6x the user, and 22x on system time for the sh version. 'Nuff said. --tom Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in <sys/errno.h>: Editor too big!" ----------------------------- From: "Jonathan I. Kamens" <jik@athena.mit.edu> Subject: Re: vi editor enhancement request Date: 16 Nov 89 20:07:17 GMT Sender: daemon@bloom-beacon.mit.edu Keywords: vi display emacs To: info-unix@sem.brl.mil In article <20668@unix.cis.pitt.edu> yahoo@unix.cis.pitt.edu (Kenneth L Moore) writes: >The big deal though is that emacs is "universal". We currently have 3 >versions of emacs (that I know of) one on the VAX, one on our Ultrix and >one on our Suns. I currently switch from machine to machine with very >little difficulty. Caveat: A few of the commands are slightly >different. Emacs is "universal"? Two questions about this: 1. Why is emacs more universal than vi, if different versions of emacs have different command sets, while vi is almost completely (I don't want to say 100% because I'm not a vi user, so don't know for sure) identical across platforms. 2. Why is emacs more universal than vi, if emacs is NOT shipped by default with most Unix systems, while vi IS shipped by default with most (if not all -- anybody here work on a system that doesn't have vi :-) Unix systems? If you're going to cite being "universal" as a reason to choose a particular editor, I'd say vi has emacs beat quite soundly in that area. One more question: 3. Why do you have different versions of emacs on your VAX, Ultrix and Sun machines is GNU emacs will compile for all of them? >It is difficult to change editors but in this case it is worth it. IMHO. Now *this* I agree with :-) Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710 ----------------------------- From: Ellen F Quaadgras <equaad@athena.mit.edu> Subject: Using ftp non-interactively Date: 16 Nov 89 17:59:03 GMT Sender: daemon@bloom-beacon.mit.edu To: info-unix@sem.brl.mil I am trying to find a way to invoke ftp on the command line, as in the following: ftp "somewhere" "accountname" "password" "command" where command could be anything from "ls" to "get file". I've tried piping the necessary information into ftp but it gets stuck on the password. I'm working with MS-DOS on an IBM AT. If anybody has an idea about how to do this, or knows of a program already written, I would be thrilled to hear from you. Please email, and I can post any results to the net later. Thank you!!!! --Ellen ----------------------------- From: "Jonathan I. Kamens" <jik@athena.mit.edu> Subject: Re: tr Date: 16 Nov 89 20:23:31 GMT Sender: daemon@bloom-beacon.mit.edu Keywords: tr ascii To: info-unix@sem.brl.mil No, the 'tr' command is not capable of changing a single character in the input to multiple characters of output. You could probably do it really easily in perl, though :-) Just another person who is amused by all the perl hackers but hasn't gotten around to learning perl himself, Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710 ----------------------------- From: Maarten Litmaath <maart@cs.vu.nl> Subject: Re: Quiet background proc. in CSH Date: 17 Nov 89 12:17:35 GMT Keywords: quiet, "&", c-shell To: info-unix@sem.brl.mil In article <4491@blake.acs.washington.edu> wiml@blake.acs.washington.edu (William Lewis) writes: \ \ I've written a shell script (in C shell; it's a .login script) that \invokes a couple of background pipes. The pipes work fine but when they \finish, they print a \ \ [1] Done ( blah blah very long pipe here ... ) \ \ message. Is there any way to get rid of this message? Preferably a way \that would also get rid of the \ \ [1] 5628 \ \ message as well, [...] You could put the pipelines in a separate script: % cat .login ... background_script < /dev/null >& /dev/null ... % cat background_script #!/bin/csh -f pipeline_1 & pipeline_2 & ... If your `background_script' could be written just as easily in Bourne shell language: % cat background_script #!/bin/sh ( pipeline_1 & pipeline_2 & ... ) & ...which gives control back to .login faster. -- [...] like a roving gang. "Ah, here's a NEW almost-empty group to post train schedules and core dumps in!" (Joe Buck) | maart@cs.vu.nl, mcsun!botter!maart ----------------------------- From: Perry Hutchison <perry@ccssrv.uucp> Subject: Re: export vars from cshell script? Date: 17 Nov 89 02:56:54 GMT To: info-unix@sem.brl.mil In article <1815@gazette.bcm.tmc.edu> heidi@kiwi.bcm.tmc.edu (Heidi Johnson) writes: >Is there an equivalent in the Cshell to the Bourne shell's export >facility? We have would like to define new environment variables in a >shell, and have them be known to subsequent processes. There is not an exact equivalent, but similar functionality is available. In Bourne shell, all variables are set with "=" and those which are to be placed in the environment are "export"ed. In C shell, variables created with "setenv" are placed in the environment while those created with "set" are private. ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: vi editor enhancement request Date: 17 Nov 89 17:05:51 GMT Keywords: vi display emacs To: info-unix@sem.brl.mil In article <15948@bloom-beacon.MIT.EDU>, jik@athena.mit.edu (Jonathan I. Kamens) writes: > 1. Why is emacs more universal than vi, if different versions of emacs > have different command sets, ... (1) EMACS runs on DECsystem-10s, and lots of other non-UNIX systems. There are flavors of EMACS for personal computers, even the Apple II. (2) The basic default key bindings are practically the same across all versions of EMACS. ^F goes forward a character, ^N goes down a line, etc. One can cutomize his own use of many flavors of EMACS via .emacsrc-like files, and there is even a "vi" emulation available for some EMACS. (The converse is impossible => EMACS is more universal in a third sense.) > 2. Why is emacs more universal than vi, if emacs is NOT shipped by > default with most Unix systems, while vi IS shipped by default with > most (if not all -- anybody here work on a system that doesn't have > vi :-) Unix systems? Serious UNIX houses generally provide some local flavor of EMACS in addition to whatever is shipped by system vendors, and of course you can get GNU EMACS for free. We've had at least five flavors of EMACS here, one of which we selected years ago to officially support lab-wide. > 3. Why do you have different versions of emacs on your VAX, Ultrix and > Sun machines is GNU emacs will compile for all of them? Why not? Is it a problem, or what? > >It is difficult to change editors but in this case it is worth it. IMHO. > Now *this* I agree with :-) Me, too, except I would go further and say that the TYPICAL user would be better served by an editor like "sam". I reserve EMACS for special circumstances, and "vi" only when there is no better choice. The main thing "better" about EMACS over "vi" is that EMACS is modeless. Experience (backed by some of the usual silly academic "studies") has shown that modeless interactive editing is overall more effective than moded. ----------------------------- From: Chris Newbold <ctne_ltd@uhura.cc.rochester.edu> Subject: Re: Prompt as Current Directory? Date: 17 Nov 89 16:09:01 GMT To: info-unix@sem.brl.mil In article <Nov.16.00.56.12.1989.9985@paul.rutgers.edu> broadman@paul.rutgers.edu (Alan Broadman) writes: > >I have a (hopefully) simple question. How can you get the UNIX prompt >to always reflect the path to the current directory. Such a prompt >would change with each 'cd ' command. In MS-DOS this is done by the >command : 'prompt $P'. I think this would be most helpful, as >otherwise, the prompt string is quite useless. I tried to do the same thing, too. Under Unix, however, it's a little cludgy. The problem I encounted when trying to insert the cwd variable into the prompt string was that csh would always evaluate it *before* assigning the prompt variable, resulting in a prompt that would display the current directory at the time of startup. The only way I found to get around it was to use an alias to change directories and then change the prompt. Try this: alias cd 'chdir \!*; set prompt = "$cwd % "' Hope this helps. -- >>>> Chris Newbold <<<< * "If you fool around with a thing for very long you * University of Rochester * will screw it up." * Disclaimer: "All warranties expire upon payment of invoice." ctne_ltd@uhura.cc.rochester.edu * uhura.cc.rochester.edu!ctne_ltd@uunet ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: core files under SV Date: 17 Nov 89 18:42:51 GMT To: info-unix@sem.brl.mil In article <29843@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes: >Um, I don't see why this "reaps the zombies". Finally, we found a way to tell who's a UNIX wizard! Hint: after the child terminates, who is the parent of the grandchild? (Yes, there is one..) ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: files recovery after rm? Date: 17 Nov 89 18:45:45 GMT To: info-unix@sem.brl.mil In article <3914@aplcen.apl.jhu.edu> bink@aplcen.apl.jhu.edu (Greg Ubben) writes: >See flame above about posting wrong answers to "relatively basic subjects". >> 1. Somewhere in the process of creating the file, the open() function [...] >It's *called* creat() (usually), and it's a system call. Hm, should we flame this flame of a flame, or should we just point out that Greg is behind the times? ----------------------------- From: Doug Gwyn <gwyn@smoke.brl.mil> Subject: Re: Using "getpwent" in SYSV/386 Date: 17 Nov 89 18:48:28 GMT Followup-To: comp.unix.i386 Keywords: C getpwent To: info-unix@sem.brl.mil In article <785@ctdi.UUCP> mikei@ctdi.UUCP (Mike Israel) writes: -This particular version of Unix stores encrypted passwords -in a file called /etc/shadow. The standard /etc/password field -for the encrypted password simply contains an 'x'. Using -"getpwent" simply retrieves this 'x'. -Is there an existing function to access the encrypted password? NO, that's the whole point of having /etc/shadow. ----------------------------- From: William Lewis <wiml@blake.acs.washington.edu> Subject: Re: Quiet background proc. in CSH Date: 17 Nov 89 20:14:54 GMT Keywords: quiet, "&", c-shell To: info-unix@sem.brl.mil Last night I poasted a question, asking how to quietly invoke background processes in a CSH script. This morning I already had three answers (two the same), so I'm posting this to hopefully stave off a flood. The two answers were: 1. Put the background stuff in a separate script, and redirect stdout from the shell. 2. (better, IMHO) Use parentheses to put the pipeline in a subshell (?), and put the '&' INSIDE the parentheses. Works like a charm! Ie, ( cat | awk | grep & ) instead of ( cat | awk | grep ) &. Thanks for all the fast responses... --- phelliax -- wiml@blake.acs.washington.edu (206)526-5885 Seattle, Washington ----------------------------- From: Dave Hitz <hitz@auspex.auspex.com> Subject: Re: the 10% factor Date: 17 Nov 89 18:58:33 GMT To: info-unix@sem.brl.mil In article <21436@adm.BRL.MIL> MATHRICH@umcvmb.missouri.edu (Rich Winkel UMC Math Department) writes: > I understand that allowing bsd filesystems to exceed 90% of their > capacity results in a significant reduction in performance. This makes > a certain amount of sense to me, at least when files are being created, > deleted or appended to. However, I've been told this is also true of > static filesystems. For instance, if I have a 20MB partition set aside > for an nfs client's swap activity, I can't utilize the entire 20MB for > the swap file, I'm supposed to leave 10% unused to avoid a performance > impact, eve though the swap file's size is unchanging. Is this true? > Could someone explain this to me? Here's a shot. The problem is that as a file grows on a mostly full partition, the block immediately following the last one in the file is generally not available. Even on almost empty files this is always a possibility, but statistically it turns out that only as the filesystem passes 90% full does this problem become nasty. Once blocks for a file are allocated in a bad order, it doesn't matter if the filesystem is static or not. If you read that file sequentially, the disk will have to seek all over the place to get the blocks. So even for static filesystems, some limit probably still makes sense. (You might try creating known rarely used files last, and crank up utilization to 100%.) Now the question about swap is interesting. When you create a swap file using mkfile(8), it allocates disk blocks when the file is created. If you create a 20 MB swap file in an otherwise empty 20 MB partition, the block allocation would probably be quite good because there would be no conflict with smaller chuncks of space being allocated in other files. If you want more than one swap file per partition, that would probably work also, but make sure *not* to run the mkswap's in parallel. Do them one after the other. (And don't use the -n option which would defeat the whole point of getting the blocks nicely allocated at create time.) -- Dave Hitz home: 408-739-7116 UUCP: {uunet,mips,sun,bridge2}!auspex!hitz work: 408-492-0900 ----------------------------- From: rick@tse.uucp Subject: Re: spell..adding new words Date: 17 Nov 89 14:27:26 GMT Keywords: spell spellin hashcheck RTFM To: info-unix@sem.brl.mil In article <11615@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <1628@novavax.UUCP> rwright@novavax.UUCP (Ronald K. Wright) writes: >>Perhaps excesses as a youth dithered my brain; but all of TFM's that I >>have read do not explain how to add words to spell's idea of correct >>words. > >System V flavors of "spell" support local word lists; RTFM again. >For older flavors, you may have to add the words to the "local" >file found in the source directory for the "spell" utility and >perform a "make install" (which will run "spellin" and copy the >resulting hash list file to the needed place). > >>Spell even in its most primative form would be helpful to me if I >>could get it to expand its vocabulary. > >What do monkeys have to do with this? > >>Perhaps someone could explain it to me, try to use simplistic terms. ;-) > >Basically, either use System V "spell" or give your word list to >your system administrator and ask that he add them to the supported >word list for "spell". ... or what you might want to do is come up with an alias something like (off the cuff but should work): alias spell "spell \!* | fgrep -v -f mywordlist" where the file mywordlist is a list of words (one per line) that you don't want spell to match -- Rick Yazwinski (geac!tse!rick) | Sarete liberi dalla schiavitu`! Advanced Systems Division | E cosi diverrete tutti liberi! The Toronto Stock Exchange | Pero uomini e donne | Sarete tutti nudi, per fino. ----------------------------- From: Sun Visualization Products <matthew@sunpix.uucp> Subject: Re: tr Date: 17 Nov 89 17:38:36 GMT Keywords: tr ascii To: info-unix@sem.brl.mil In article <15949@bloom-beacon.MIT.EDU> jik@athena.mit.edu (Jonathan I. Kamens) writes: } } No, the 'tr' command is not capable of changing a single character }in the input to multiple characters of output. } } You could probably do it really easily in perl, though :-) } } Just another person who is amused by all the perl hackers but hasn't }gotten around to learning perl himself, } }Jonathan Kamens USnail: }MIT Project Athena 11 Ashford Terrace }jik@Athena.MIT.EDU Allston, MA 02134 }Office: 617-253-8495 Home: 617-782-0710 True, but this particular problems can be handled by AWK also. awk '{printf ("%s\r\n", $0)}' $* [Note: code written on the fly, and untested - but should work] -- Matthew Lee Stier | Sun Microsystems --- RTP, NC 27709-3447 | "Wisconsin Escapee" uucp: sun!mstier or mcnc!rti!sunpix!matthew | phone: (919) 469-8300 fax: (919) 460-8355 | ----------------------------- From: Edward Vielmetti <emv@math.lsa.umich.edu> Subject: Re: the 10% factor (making swap files) Date: 17 Nov 89 19:57:24 GMT Sender: news@math.lsa.umich.edu To: info-unix@sem.brl.mil Dave Hitz's article refers to creating swap files with mkfile (this is on a sun at least) and recommends not to use the -n option since that will lead to fragmented swapfiles. That's fine but -- space is a bit tight here, & various people use their machines differently. I'd really like to give most people on diskless 4m 3/50's a 16M swap file that has say 8M pre-allocated & filled w/whatever it takes to swap nicely, and leave the other 8M to grow dynamically just in case someone manages to need it. I don't see a way to do it with the tools provided, -- does this approach make sense, & what would it take to do it ? thanks --Ed ----------------------------- From: Bill Fuller <fuller@kadsma.uucp> Subject: When is GNU OS coming out? Date: 17 Nov 89 19:45:30 GMT Sender: The Devil Himself <daemon@ektools> To: info-unix@sem.brl.mil Hi, For a long time, there were a large number of articles on proposed features for GNU OS. Does anyone know what the status of GNU OS is as of today? Will it be released next year? Are they looking for alpha testers? All info is welcome. Bill F. ----------------------------- From: Lite Lin <lin@cs.wmich.edu> Subject: Pass environment through rlogin Date: 17 Nov 89 21:30:47 GMT To: info-unix@sem.brl.mil I have a simple question. I understand that if I 'rlogin' to another host, certain environment variables, such as TERM and maybe something else, will be copied over to the new host, but I'm wondering whether I can pass on other information to the new host as well, such as an environment variable defined by myself. Any response will be appreciated. Thanks in advance. Lite -- We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. -- Declaration of Independence ----------------------------- From: Pete Holsberg <pjh@mccc.uucp> Subject: Re: vi editor enhancement request Date: 17 Nov 89 14:59:11 GMT Keywords: vi display To: info-unix@sem.brl.mil In article <5530@ethz-inf.UUCP> wyle@ethz.UUCP (Mitchell Wyle) writes: =Vi intentionally does not put all kinds of crap on your screen (like =wordstar) other than the text. I beg your pardon. WordStar only puts the crap that you want on the screen. It is Microsoft WORD that eats a large percentage of your usable lines, trying to be friendly. WS is too good an editor that has been overlooked by the press for me to let that statement go by! -- Pete Holsberg UUCP: {...!rutgers!}princeton!mccc!pjh Mercer College CompuServe: 70240,334 1200 Old Trenton Road GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800 ----------------------------- From: Chris Hinds <chinds@oakhill.uucp> Subject: Re: Looking for IEEE Floating Point Test Suite Date: 17 Nov 89 23:01:14 GMT Posted: Fri Nov 17 17:01:14 1989 To: info-unix@sem.brl.mil rogerc@sauron.Columbia.NCR.COM (Roger Collins) writes: >I'm looking for a floating point test suite what will test >IEEE conformance in the non-signaling mode. I'm especially >interested in testing the exceptional cases involving operations >on infinity, NaN's, and zero. Please send this my way, too. ************************************************* * Motorola Microprocessor Products Sector * * Austin, Tx * * * * Chris N. Hinds <>< * * oakhill!wtkatz!chinds@cu.utexas.edu * ************************************************* ----------------------------- From: "David E. Bernholdt" <bernhold@qtp.ufl.edu> Subject: CPU time limit on an entire process group? Date: 17 Nov 89 23:10:54 GMT To: info-unix@sem.brl.mil I want to be able to enforce CPU time limits on a process group as a whole: send every process in the group a signal when the CPU time accumulated by all of the processes exceedes some limit. I tried setrlimit, but that give only a per-process limit. Searching through the man pages, I can't even find a way of getting the actual usage of an entire process group -- everything I can find reports only terminated processes. The only thing I can think of would be to actually work through the whole group in the process table and add everything up. Is this the thing to do? If anyone has a code which would do this (or pieces of it) I would like to look at it. I'm running SunOS 4.0.1. Thanks. -- David Bernholdt bernhold@qtp.ufl.edu Quantum Theory Project bernhold@ufpine.bitnet University of Florida Gainesville, FL 32611 904/392 6365 ----------------------------- From: Indra Singhal <indra@amdcad.amd.com> Subject: UNIX conferences in 1990 List? Date: 18 Nov 89 00:09:44 GMT To: info-unix@sem.brl.mil Does anyone have a list with dates, locations, agenda, etc. of all UNIX related conferences in the US? I would appreciate receiving a copy if you have it online. Please mail me directly to eliminate multiple postings. Thanks in advance. -- iNDRA | indra@amdcad.AMD.COM | {ames decwrl gatech pyramid sun uunet}!amdcad!indra | MS 167; Box 3453; Sunnyvale, CA 94088 ----------------------------- From: Jeffrey Kirk <captain@vax1.acs.udel.edu> Subject: Re: vi editor enhancement request Date: 17 Nov 89 23:53:04 GMT Keywords: vi > emacs To: info-unix@sem.brl.mil In article <11630@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > >The main thing "better" about EMACS over "vi" is that EMACS is modeless. >Experience (backed by some of the usual silly academic "studies") has >shown that modeless interactive editing is overall more effective than moded. I use both vi and emacs, but emacs, modeless? When is the last time you looked at your status line? What are magic, exact, cMODE (hint-hint), etc... sure look like MODES to me. I guess what you are complaining about is the "input" mode in vi, well everyone has an opinion, personally I can't stand having my left-pinky-finger glued to the ctrl key 100% of the time in EMACS (Editor for Morons Attracted to Control Sequences). -Person forced to use EMACS every day :-[ ----------------------------- From: Cathy Benney <cathy@ncelvax.uucp> Subject: sed Date: 18 Nov 89 01:53:50 GMT Keywords: sed tutorial To: info-unix@sem.brl.mil Can anyone recommend a good book for learning "sed"? I am running 4.3 BSD UNIX System. Thank You. ----------------------------- From: Jock Cooper <jockc@attctc.dallas.tx.us> Subject: libdbm Date: 17 Nov 89 23:39:30 GMT To: info-unix@sem.brl.mil Could someone be so kind as to mail me source code to libdbm.a? Do not send to this account, instead send to: uunet!hammer!jockc or jockc@idsila.com Thanks in advance, Jock Cooper ----------------------------- From: Marc Sabatella <mjs@hpfcso.hp.com> Subject: Looking for MUSBUS Date: 13 Nov 89 23:44:00 GMT To: info-unix@sem.brl.mil I am looking for information about the MUSBUS benchmark from Monash University. Please E-mail any pointers. -------------- Marc Sabatella HP Colorado Language Lab marc%hpfcrt@hplabs.hp.com ----------------------------- From: Kevin Fink <kfink@jarthur.claremont.edu> Subject: Changing upper-case filenames to lower-case Date: 18 Nov 89 03:19:51 GMT To: info-unix@sem.brl.mil Is there an easy way to change all the upper-case characters in a filename (or set of filenames) to lower-case? Whenever I transfer files from my PC to the mainframe the filenames get changed to all caps. This is really annoying. Thanks. Kevin Fink ----------------------------- From: Dan Mick <dan@charyb.com> Subject: Re: vi editor enhancement request Date: 17 Nov 89 19:04:26 GMT Keywords: vi display emacs To: info-unix@sem.brl.mil AAAAA! *PLEASE* stop arguing about editors, or we'll have a 100-message thread without even trying! Just resist the impulse, or do it in mail... *PLEASE*!!! -- .sig files are idiotic and wasteful. ----------------------------- From: Tom Ohmer <nam2254@dsacg2.uucp> Subject: Can not mail off-site, RTFM not much help Date: 17 Nov 89 22:29:44 GMT Keywords: unknown domain To: info-unix@sem.brl.mil In an attempt to NOT post an article with a question (like I'm doing now), I tried to mail to Henry Spencer at the University of Toronto Zoology Dept. The mail program here did not like any of the three addresses I used. I tried: uunet!attcan!utzoo!henry from Henry's .sig henry@zoo.toronto.edu " " " henry@utzoo.uucp " " header From: line I have received mail in response to postings I've made, and would like to do the same, but the man(ual) I've spent (too much of) today in isn't helping, and everyone around here that I have asked knows less than I do. Thanks in advance for any help. -- Tom Ohmer @ Defense Logistics Agency Systems Automation Center, DSAC-AMB, Bldg. 27-6, P.O. Box 1605, Columbus, OH 43216-5002 UUCP: ...{seismo!osu-cis}!dsacg2!tohmer INTERNET: tohmer@dsacg2.dla.mil Phone: (614) 238-9210 AUTOVON: 850-9210 Disclaimer claimed ----------------------------- From: P E Smee <exspes@gdr.bath.ac.uk> Subject: Re: export vars from cshell script? Date: 16 Nov 89 11:04:51 GMT To: info-unix@sem.brl.mil In article <1815@gazette.bcm.tmc.edu> heidi@kiwi.bcm.tmc.edu (Heidi Johnson) writes: >Is there an equivalent in the Cshell to the Bourne shell's export >facility? We have would like to define new environment variables in a >shell, and have them be known to subsequent processes. > >We're using SunOS 4.0. Use setenv. (See csh(1)). Variables defined using setenv are available in child processes. The syntax of setenv is different from set, God only knows why. Look also at the 'Variable substitutions' section in csh(1), as there are limitations on the use of : modifiers if a variable is an environment var rather than a shell (set) var. If you have the same name both 'set' and 'setenv'ed in a process, the 'set' definition should win. (So, if you need to use : modifiers on env'ed vars, you need to arrange for the child process to do something like: set fred $fred (Assuming fred is not already 'set', the 'setenv' value will be picked up.) -- Paul Smee | JANET: Smee@uk.ac.bristol Computer Centre | BITNET: Smee%uk.ac.bristol@ukacrl.bitnet University of Bristol | Internet: Smee%uk.ac.bristol@nsfnet-relay.ac.uk (Phone: +44 272 303132) | UUCP: ...!uunet!ukc!gdr.bath.ac.uk!exspes ----------------------------- From: P E Smee <exspes@gdr.bath.ac.uk> Subject: Re: export vars from cshell script? Date: 16 Nov 89 11:08:37 GMT To: info-unix@sem.brl.mil In article <869@awdprime.UUCP> @cs.utexas.edu:ibmaus!auschs!woan.austin.ibm.com!ron writes: >In article <1815@gazette.bcm.tmc.edu>, heidi@kiwi.bcm.tmc.edu (Heidi >writes: >> Is there an equivalent in the Cshell to the Bourne shell's export >> facility? We have would like to define new environment variables in a >> shell, and have them be known to subsequent processes. > >I may be way off base, but I have always been under the impression that >setenv automatically exported them??!! Sposed to do, yep. Problem is that people who are just moving to csh from sh tend to overlook 'setenv', because csh also has 'set' which looks at first glance like it ought to be equivalent to sh 'set'. (In fact, I suppose it is. It's the fact that csh lacks 'export' which is critical, and which is what they notice.) -- Paul Smee | JANET: Smee@uk.ac.bristol Computer Centre | BITNET: Smee%uk.ac.bristol@ukacrl.bitnet University of Bristol | Internet: Smee%uk.ac.bristol@nsfnet-relay.ac.uk (Phone: +44 272 303132) | UUCP: ...!uunet!ukc!gdr.bath.ac.uk!exspes ----------------------------- From: P E Smee <exspes@gdr.bath.ac.uk> Subject: Re: export vars from cshell script? Date: 16 Nov 89 12:02:45 GMT To: info-unix@sem.brl.mil In article <1989Nov16.110451.10002@gdt.bath.ac.uk> exspes@gdr.bath.ac.uk (P E Smee) writes: >(So, if you need to use : modifiers on env'ed vars, you need to arrange >for the child process to do something like: > >set fred $fred > Oops, that should, of course, be: set fred=$fred -- Paul Smee | JANET: Smee@uk.ac.bristol Computer Centre | BITNET: Smee%uk.ac.bristol@ukacrl.bitnet University of Bristol | Internet: Smee%uk.ac.bristol@nsfnet-relay.ac.uk (Phone: +44 272 303132) | UUCP: ...!uunet!ukc!gdr.bath.ac.uk!exspes ----------------------------- From: P E Smee <exspes@gdr.bath.ac.uk> Subject: Re: vi editor enhancement request Date: 16 Nov 89 12:38:10 GMT Keywords: vi display emacs To: info-unix@sem.brl.mil In article <20668@unix.cis.pitt.edu> yahoo@unix.cis.pitt.edu (Kenneth L Moore) writes: >Emacs even allows for the execution of unix commands while in the >editor. For example: I type Capture Command Output then type date. This In vi, try :r! shell command... Don't get me wrong, I like emacs, but it has to always be in cbreak mode which can be painful on a packet-switched network connection. vi can (wouldn't want to say whether any particular implementation *does* or not) go into packetized modes when in input mode. -- Paul Smee | JANET: Smee@uk.ac.bristol Computer Centre | BITNET: Smee%uk.ac.bristol@ukacrl.bitnet University of Bristol | Internet: Smee%uk.ac.bristol@nsfnet-relay.ac.uk (Phone: +44 272 303132) | UUCP: ...!uunet!ukc!gdr.bath.ac.uk!exspes ----------------------------- End of INFO-UNIX Digest ***********************