home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4870 < prev    next >
Encoding:
Internet Message Format  |  1992-11-24  |  62.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.ans.net!cmcl2!adm!news
  2. From: postmaster@starlab.csc.com (SMTP MAILER)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Mail not delivered yet, still trying
  5. Message-ID: <34247@adm.brl.mil>
  6. Date: 23 Nov 92 22:33:17 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 1721
  9.  
  10.  
  11.  ----Mail status follows----
  12. Have been unable to send your mail to <DGRAY@STARLAB.CSC.COM>
  13. for one day, will keep trying for another seven days.
  14. At that time your mail will be returned.
  15.  
  16.  ----Transcript of message follows----
  17. Date: 22 Nov 92 03:25:00 EST
  18. From: UNIX-WIZARDS@BRL.MIL
  19. Subject: UNIX-WIZARDS Digest  V17#004
  20. To: "DGRAY" <DGRAY@STARLAB.CSC.COM>
  21.  
  22. Return-Path: <unix-wizards-request@sem.brl.mil>
  23. Received: from SEM.BRL.MIL by milo.starlab.csc.com with SMTP ; 
  24.           Sun, 22 Nov 92 03:19:46 EST
  25. Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab25954; 21 Nov 92 8:04 EST
  26. Received: from sem.brl.mil by SEM.BRL.MIL id aa25917; 21 Nov 92 7:53 EST
  27. Date:       Sat, 21 Nov 92 07:52:51 EST
  28. From:       The Moderator (Mike Muuss) <Unix-Wizards-Request@BRL.MIL>
  29. To:         UNIX-WIZARDS@BRL.MIL
  30. Reply-To:   UNIX-WIZARDS@BRL.MIL
  31. Subject:    UNIX-WIZARDS Digest  V17#004
  32. Message-ID:  <9211210753.aa25917@SEM.BRL.MIL>
  33.  
  34. UNIX-WIZARDS Digest          Sat, 21 Nov 1992              V17#004
  35.  
  36. Today's Topics:
  37.                        Re: The Problem with UNIX
  38.                  Re: Detecting if running under chroot
  39.                  Re: HELP! problem with tar PC <-> SUN
  40.                        Still x_cdplayer problems
  41.                  Secondary Groups Failure Intermittent
  42.                       Re: TLI and non-blocking I/O
  43.                               Re: Thanks,
  44.                   Re: Changing the owner of a process
  45.               Programs to create and apply binary patches?
  46.                 Re: Solaris 2.0/2.1 Realtime programming
  47.                          Re: system call write
  48.  
  49. -----------------------------------------------------------------
  50.  
  51. From: Bruce Barnett <barnett@grymoire.crd.ge.com>
  52. Subject: Re: The Problem with UNIX
  53. Date: 16 Nov 92 11:46:53 GMT
  54. Sender: Required for NNTP <usenet@crd.ge.com>
  55. Nntp-Posting-Host: grymoire.crd.ge.com
  56. To:       unix-wizards@sem.brl.mil
  57.  
  58. In article <1992Nov13.094336.2341@aber.ac.uk> btk@aber.ac.uk (Ben Ketteridge) writes:
  59. >For example, just to take the 'cat a b > b' problem, you are suggesting IMHO that
  60. >the shell shouldn't check redirection of output against the input and warn the
  61. >user in this case.
  62.  
  63. Suppose the command was
  64.     prog >b
  65. and "prog" was a shell script that said "cat a b"? Or a C, Lisp, or
  66. Perl program?
  67.  
  68. How can the shell "know" that the output is also an input? It can't.
  69.  
  70.     
  71. --
  72. Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
  73.  
  74. -----------------------------
  75.  
  76. From: Bruce Barnett <barnett@grymoire.crd.ge.com>
  77. Subject: Re: The Problem with UNIX
  78. Date: 16 Nov 92 15:08:53 GMT
  79. Sender: Required for NNTP <usenet@crd.ge.com>
  80. Nntp-Posting-Host: grymoire.crd.ge.com
  81. To:       unix-wizards@sem.brl.mil
  82.  
  83. In article <1992Nov13.224718.15935@chpc.utexas.edu> michael@chpc.utexas.edu (Michael Lemke) writes:
  84. >   No, I don't.  I am complaining that the options are a) parsed
  85. >   inconsistently (`bla -lx a' might be valid and `bla -l x a' not but
  86. >   `foo -l x a ' is ok and `foo -lx a' is not) and b) that -l means long
  87. >   for ls -l but library for f77 -l.  I want ls -long and f77 -library and
  88. >   be able to abbreviate both -long and -library because `long' and
  89. >   `library' is what I mean and not -l.
  90.  
  91. >   >It sounds like most of your problem is due to the large number of UNIX
  92. >   >utilities. How many does DOS have? 
  93.  
  94. >   No idea.  I don't know DOS.
  95.  
  96. Well, what are you comparing Unix to? As I stated, I currently have
  97. 2033 commands available. When you consider the large number of
  98. commands, along with the ease of creating new ones, it is no wonder
  99. they are inconsistent. As Boyd says, VMS also has inconsistencies
  100. (I personally don't know enought to comment). ANY system that has the
  101. large number of commands is bought to have inconsistancies, unless the
  102. creation of these programs are under tight control, and we can throw
  103. out backwards compatability. Even so, people will want to deviate from
  104. the strict guidelines because it makes the interface friendlier.
  105.  
  106. Consider your "-l" example. Unix is considerate of the person typing
  107. all day.  I don't want to type dozens of extra characters for commands
  108. I execute all of the time.
  109.  
  110. How can you allow variable length options and still allow terseness
  111. when typing?
  112.  
  113. I don't want to type
  114.     list -long -time  -reverse -all
  115. or 
  116.     list -lo -ti  -r -a
  117. or 
  118.     list -lo/ti/r/a
  119. or even 
  120.     list -l/t/r/a
  121. when I can type
  122.     ls -ltra
  123.  
  124.  
  125. Same thing with the -l option to cc/ld.
  126.  
  127.     -lm
  128. is equivalent to the more logical
  129.  
  130.      -library=/usr/lib/libm.a
  131. or even
  132.      -library=libm.a
  133. or     -l=libm.a
  134.  
  135. Unix is inconsistant and power user friendly. 
  136.  
  137. You must also consider the possibility of adding new options (which is
  138. very easy to do.) Consider a command that allowed
  139.     -long
  140.     -lon
  141.     -lo
  142. and
  143.     -l
  144.  
  145. as valid. Suppose you add a "-low" option? Old scripts who uses "-l"
  146. or "-lo" could break. This is a fatal flaw. You could add new options
  147. that never conflict with previous options, but then this also has
  148. problems because you are forces to select options whoes words that
  149. might not make sense.
  150.  
  151. IMHO adding consistency to Unix would place an extra burden for the person
  152. typing on the keyboard all day long.
  153. --
  154. Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
  155.  
  156. -----------------------------
  157.  
  158. From: Leslie Mikesell <les@chinet.chi.il.us>
  159. Subject: Re: The Problem with UNIX
  160. Date: 16 Nov 92 18:38:43 GMT
  161. To:       unix-wizards@sem.brl.mil
  162.  
  163. In article <id.6HYU.VML@ferranti.com> peter@ferranti.com (peter da silva) writes:
  164.  
  165. >No, I am of the opinion that if you want to send binary data you should use
  166. >a program called "send", rather than overloading the semantics on mail. In
  167. >principle you have no idea what the recipient will be able to deal with, and
  168. >in the general case you have no way to know.
  169.  
  170. I realize that this may be what you *have* to do, but that goes along
  171. with the topic of this thread.  I can't see why it should be that way
  172. except for "historical" reasons which is kind of an anacronism in a
  173. world where two-year old equipment is obsolete.
  174.  
  175. Besides, if you don't know what the recipient will be able to deal
  176. with, why would you want to send a binary file?
  177.  
  178. >If your default mail program
  179. >just arbitrarily makes assumptions (in the absence of explicit command line
  180. >options or an interactive exchange) about the capabilities of the recipient
  181. >and mail transfer tools (who knows, they could be on Fido, or Compuserve)
  182. >then you WILL burn people.
  183.  
  184. This is true of virtually any form of data transfer.  Should tar and cpio
  185. refuse to transfer arbitrary data too, on the assumption that someone
  186. might try to retreive it on a machine where it couldn't be used?
  187.  
  188. >In the meantime, the following should be a 40 line shell script:
  189.  
  190. Shell script??? Now who's making assumptions?  Hardly anyone that I
  191. would send a binary attachment to is on a machine that can run a
  192. shell script.
  193.  
  194. Les Mikesell
  195.   les@chinet.chi.il.us
  196.  
  197. -----------------------------
  198.  
  199. From: The Man Behind The Curtain <ski8032@tamsun.tamu.edu>
  200. Subject: Re: The Problem with UNIX
  201. Date: 16 Nov 92 19:57:33 GMT
  202. To:       unix-wizards@sem.brl.mil
  203.  
  204. Thus spake so@brownie.cs.wisc.edu (Bryan S. So):
  205. >I am doing research on UNIX command line interface problems.
  206. >I am sure everyone has his/her favorite UNIX troubles, would
  207. >you post or email me what's your favorites?  What should have
  208. >been done by UNIX to resolve that problem in general?
  209. > [..]
  210. >To start the discussion, consider the following problems:
  211. >
  212. >    cat a b > b
  213.  
  214. Or tail -10 .fingerees > .fingerees
  215. Clearly what I would like to do is chop out all but the last ten
  216. lines of .fingerees (This file contains a list of whoever has
  217. fingered me.  It is now 
  218.      124 .fingerees  lines long.  Rather cumbersome.)  But
  219. instead I must do 
  220.  
  221. tail -10 .fingerees > result.txt; mv result.txt .fingerees
  222.  
  223. A much less elegant solution.  How can the shell know what is
  224. going on however?  What if cat -> /usr/5bin/echo for instance?
  225.  
  226. So this would be my proposal.  Rather than requiring that the
  227. shell know everything about any possible application it could
  228. run and make it try to figure out all the possible ramifications
  229. of its actions, could we try something like this...
  230.  
  231. The shell sees
  232. tamsun ~> cat a b > b
  233. First, it finds /usr/bin/cat.  Then it looks inside a file called,
  234. let's say .cat.  The file contains a few lines of specifications
  235. in some language know to the shell like this
  236.  
  237. % Cat specifications & limitations
  238. % All files on the cmd line are read-only
  239. % Write permission is not given for the current
  240. % process for these files
  241.  
  242. $* files read-only
  243.  
  244. end
  245.  
  246. The shell makes a list of read only files for the current process
  247. (a b) and then proceeds on, and tries open b.  Since permission
  248. is not there, the operation fails and an error message is returned.
  249. (The error msg could possibly be described in .cat)  Though some
  250. shells will return an error msg already, it destroys your data
  251. anyway.  This could avoid it, or allow the specification to tell
  252. it how to deal with it.
  253.  
  254. For example, ask the user if they wish to concatenate a & b
  255. and store the result in b.  If they answer yes, the shell does...
  256. cat a b > uniq-name; mv uniq-name b
  257. (Being careful about going over quotas, etc.)  And voila!  The
  258. problem was handled with intelligence and grace.  Not to mention
  259. that future programs can inform the shell what actions they are
  260. doing w/o having to rewrite the shell each time to make it guess.
  261.  
  262. /usr/bin/.echo might be empty or not exist, thus telling the shell
  263. that it doesn't have to worry about protecting/overwriting input
  264. files.  (Of course, .echo must be in the real place of the actual
  265. file...)
  266.  
  267. Note that this is just being sketched out in rough detail,
  268. particularly when I say something like 'current process' but
  269. I think it would provide a great level of intelligence and
  270. friendliness to the Un*x shell and would be feasible.  What
  271. do true Un*x advocates think?
  272.  
  273. BTW, the reason why many people are clamoring for a friendlier
  274. Un*x shell is that while Un*x may be expert-friendly, it's lack
  275. of user friendliness will definitely hinder its acceptance in
  276. the larger world.  While some Un*x weenies may scoff at those
  277. who choose other alternatives, doing so only hurts Un*x, for
  278. by expanding and growing it can only improve.  Version numbers
  279. on files, for instance, might be a better way to handle the
  280. above problems for instance.
  281.  
  282. And Un*x is definitely not "user-friendly," at least not to
  283. anyone I've talked to.  Only Un*x advocates and Un*x tutorials
  284. claim such a thing.  I wonder what they are comparing it
  285. to..  CP/M perhaps?  It is clearly time for Un*x to
  286. reach out and COPY /B someone. + ,,
  287.  
  288. >Bryan So
  289.  
  290. -- 
  291. Till next time,                \o/   \o/
  292.                                 V \o/ V     email:pinky@tamu.edu
  293. <>  Sam  Inala  <>                 V
  294.  
  295. -----------------------------
  296.  
  297. From: Daniel Smith <dansmith@autodesk.com>
  298. Subject: Re: The Problem with UNIX
  299. Date: 16 Nov 92 21:42:39 GMT
  300. Followup-To: comp.unix.wizards
  301. To:       unix-wizards@sem.brl.mil
  302.  
  303. In <1992Nov13.213107.5722@chpc.utexas.edu> michael@chpc.utexas.edu (Michael Lemke) writes:
  304.  
  305. > In article <1992Nov13.094336.2341@aber.ac.uk> btk@aber.ac.uk (Ben Ketteridge) writes:
  306. > >For example, just to take the 'cat a b > b' problem, you are suggesting IMHO 
  307. > >that
  308. > >the shell shouldn't check redirection of output against the input and warn the
  309. > >user in this case.
  310.  
  311. > Actually, I think this example should work!  It is a perfectly 
  312. > reasonable request.  
  313.  
  314.     No it isn't, consider my "glasses of water" theorem:
  315.  
  316.  
  317.          |         |          |           |
  318.          |~~~~~~~~~|          |~~~~~~~~~~~|
  319.          |         |          |           |
  320.          |         |          |           |
  321.          |    A    |          |    B      |
  322.          |         |          |           |
  323.           \_______/            \_________/
  324.  
  325.  
  326.     Ok, B can get bigger (i.e. a goblet, or a pitcher) to accept water
  327. from A, but what do you mean to do with B's original water?  I think
  328. B's original water must go to:
  329.  
  330.          |      |_
  331.          |~~~~~~| \
  332.          |   C  | ||
  333.          |      |_/
  334.           \____/
  335.  
  336.     C, an arbitrary coffee cup in n-dimensional cupboard space, which
  337. can expand to hold any amount of liquid found in A & B.  I think you're
  338. suggesting throwing B's water up in the air while A's water goes to B,
  339. and having B's water splash on top.  This violates most of the laws of kitchen
  340. physics (see Child, Julia "Fractal Baking") and just makes a big mess.
  341. The third container (Tupperware or otherwise) saves the day.  With
  342. this example, you could pour all of the water from C back into B (mv)
  343. and then put C in the dishwasher (rm).
  344.  
  345.                 Daniel
  346. -- 
  347.      Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
  348.           Disclaimer: written by a highly caffeinated mammal
  349.         dansmith@autodesk.com            dansmith@well.sf.ca.us
  350.  
  351. -----------------------------
  352.  
  353. From: Greg Brail <gjb@fig.citib.com>
  354. Subject: Re: The Problem with UNIX
  355. Date: 16 Nov 92 21:59:11 GMT
  356. Sender: news@fig.citib.com
  357. To:       unix-wizards@sem.brl.mil
  358.  
  359. In article <97716@netnews.upenn.edu> rsk@gynko.circ.upenn.edu (Rich Kulawiec) writes:
  360. >In article <Bxq6uz.BB8@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
  361. >>These problems could be solved as easily under unix as anywhere else,
  362. >>except for the fact that people who have spent years learning unix
  363. >>have forgotten that there is a problem.
  364.  
  365. Bravo! Exactly.
  366.  
  367. >"Problem" is a matter of opinion; I consider the items you list "features",
  368. >and find the occasional toasting that they give to a user who didn't RTFM
  369. >a helpful educational tool. 
  370.  
  371. Not too many years ago a bunch of Navy crewmen who hadn't read all the FMs
  372. on the USS Vincennes blew up an airliner, killing hundreds of innocent people.
  373. I realize this is an extreme example, but the stone-age attitude that
  374. user interfaces must be cryptic to "teach the user a lesson" is alive and
  375. well in UNIX. 
  376.  
  377. UNIX is becoming more and more common in commercial environments, but this 
  378. attitude will drive people away. Fortunately, it's possible to give "Joe 
  379. User" a reasonable interface and save the command line for the hackers.
  380.  
  381. I consider myself a fairly knowledgable UNIX user, but I still type 
  382. "tar cvf file.tar ." from time to time and don't realize it until "file.tar"
  383. recursively grows to 200MB and fills the filesystem. Feel free to laugh and
  384. call me an idiot. I really couldn't care less. And I don't expect to
  385. win this argument as long as it stays in comp.unix.wizards, where it
  386. doesn't belong anyway.
  387.  
  388. > I happen to like the expert-friendly
  389. >and relatively unforgiving nature of most Unix implmentations.  Those
  390. >who feel otherwise are certainly free to implement whatever warm-fuzzy-
  391. >hand-holding-protect-the-user-from-themselves features they wish.
  392.  
  393. That's why I have a Macintosh at home.
  394.                 
  395.                 greg
  396. -- 
  397. Greg Brail ------------------ Citibank -------------------- gjb@fig.citib.com
  398. lose (lOOz) v. 1. a. To be unable to find; mislay. b. To incur the 
  399. deprivation of, as by negligence or accident. 2. To be unable to maintain,
  400. sustain, or keep. 3. The most commonly misspelled word on Usenet.
  401.  
  402. -----------------------------
  403.  
  404. From: Kenneth Ng <ken@sugra.uucp>
  405. Subject: Re: The Problem with UNIX
  406. Date: 17 Nov 92 01:19:06 GMT
  407. To:       unix-wizards@sem.brl.mil
  408.  
  409. In article <1992Nov14.145943.1288@global.hacktic.nl: peter@global.hacktic.nl (Peter Busser) writes:
  410. :kanderso@reed.edu (Karl Anderson) writes:
  411. :>Is there any reason why there can't be another stream for more
  412. :>user-friendly messages?
  413. :Yes! Feeping creaturism. I'm pro user friendly messages, but, IMHO, consistency
  414. :and clarity are much more important than verboseness. Furthermore, it would
  415. :require existing programs to be extended with the verbose message.
  416. :A better approach would be, IMHO, to leave the messages what they are and make
  417. :every program return a meaningful error number. A seperate program could
  418. :figure out which verbose message belongs to that number.
  419.  
  420. I would like to see two things: one, have the program that generates the
  421. error message put *ITS* *NAME* as the first part of the error message.
  422. Second, print something meaningful like perror().  I do not know how many
  423. times I've seen "can not open file" in a script that calls other scripts
  424. that calls a few dozen routines.  So then I have to find out WHAT program
  425. could not open WHAT file.
  426.  
  427. -- 
  428. Kenneth Ng
  429. Please reply to ken@eies2.njit.edu for now.
  430. Apple and AT&T lawsuits: Just say NO!
  431.  
  432. -----------------------------
  433.  
  434. From: mat@mole-end.matawan.nj.us
  435. Subject: Re: The Problem with UNIX
  436. Date: 17 Nov 92 02:15:38 GMT
  437. To:       unix-wizards@sem.brl.mil
  438.  
  439. In article <BxpwnM.72o@chinet.chi.il.us>, les@chinet.chi.il.us (Leslie Mikesell) writes:
  440. > In article <1992Nov12.221405.7594@mole-end.matawan.nj.us> mat@mole-end.matawan.nj.us writes:
  441.  
  442. > >I disagree on this one.  I can't stand the SVr4 mail program's unwillingness
  443. > >to display a file in which someone has accidentally put ONE backspace or
  444. > >escape.  And of course there are nroff output files with
  445. > >  _^hu_^hn_^hd_^he_^hr_^hl_^hi_^hn_^h_^he  in them.
  446.  
  447. > I meant the transport does the right thing in delivering the message as
  448. > sent.  I didn't think anyone actually used SysV mail's user interface
  449. > (or lack thereof).
  450.  
  451. > >This user says `Plugh!'
  452.  
  453. > Do yourself a favor and compile ELM.
  454.  
  455. This user says `bletch!'  I've got ELM.  It threw away a valuable piece of
  456. mail on me because the mail included another mail header.  Right now I have
  457. a non-elm mailbox with a message in it that ELM will present out of order.
  458. ELM's handling of the cursor keys is just plain wrong. ... ... ...
  459.  
  460. What?  It's just fine for you and you haven't noticed any problems?
  461.  
  462.     Jack Sprat could eat no fat
  463.     And his wife could eat no lean ...
  464.  
  465. My favorite way to deal with mail is to go into vi, create a mail command
  466. with a here document filled with blank lines and ending in `x', and 1G!Gksh
  467. the whole thing.  It subjects me to the fewest bogons of anything I've got.
  468. (Oh, you don't like vi?  Fine with me.  I'll put emacs up for you ... but
  469. don't pepper our source files with emacs directives or leave incomplete
  470. lines.  Speaking of which, why does emacs display a line number for the
  471. next line when you are at the end and there isn't any next line?  Bogus.)
  472.  
  473. And _that_, perhaps, is the grace of UNIX over VMS and OS/2 and Motif
  474. and all those other highly-polished, highly developed straitjackets.
  475.  
  476.     There are four ways to do any task: the Right Way, the Wrong
  477.     Way, the Navy Way, and My Way.  And this, gentlemen, is my ship.
  478. -- 
  479.  (This man's opinions are his own.)
  480.  From mole-end                Mark Terribile
  481.  
  482.  mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
  483.  
  484. -----------------------------
  485.  
  486. From: Valdis Kletnieks <valdis@black-ice.cc.vt.edu>
  487. Subject: Re: The Problem with UNIX
  488. Date: 17 Nov 92 02:23:12 GMT
  489. Sender: news@vtserf.cc.vt.edu
  490. Followup-To: comp.unix.wizards
  491. To:       unix-wizards@sem.brl.mil
  492.  
  493. In article <EEIDE.92Nov12154722@asylum.cs.utah.edu> eeide%asylum.cs.utah.edu@cs.utah.edu (Eric Eide) writes:
  494. >
  495. >It sounds as if you are proposing the invention of an application-independent
  496. >command line parser that does more than just syntactic processing (as provided
  497. >by getopt()).  This would definitely be interesting -- but is it really
  498. >possible?  What would it look like?  What would the universal meaning of `-l'?
  499.  
  500. Didn't the opsys on the DEC-20 (twenex?) do this?  I think it even
  501. allowed 'completion' of more than just filetypes - however, it *did*
  502. involve firing up the binary of the program a bit earlier because
  503. there was some incestuous relationship between the command's code
  504. and the command line interpreter.  Essentially, the command had
  505. a section of code that could be called by the interpreter to
  506. "assist" parsing.
  507.  
  508. Twenex gurus feel free to correct me.
  509.  
  510.                 Valdis Kletnieks
  511.                 Computer Systems Engineer
  512.                 Virginia Tech
  513.  
  514. -----------------------------
  515.  
  516. From: Oleg Kibirev <oleg@gd>
  517. Subject: Re: The Problem with UNIX
  518. Date: 17 Nov 92 07:47:20 GMT
  519. Nntp-Posting-Host: gd.cs.csufresno.edu
  520. To:       unix-wizards@sem.brl.mil
  521.  
  522. In article <1992Nov14.145943.1288@global.hacktic.nl> peter@global.hacktic.nl (Peter Busser) writes:
  523. >kanderso@reed.edu (Karl Anderson) writes:
  524. >
  525. >>Is there any reason why there can't be another stream for more
  526. >>user-friendly messages?
  527. >
  528. >Yes! Feeping creaturism. I'm pro user friendly messages, but, IMHO, consistency
  529. >and clarity are much more important than verboseness. Furthermore, it would
  530. >require existing programs to be extended with the verbose message.
  531. >
  532. >A better approach would be, IMHO, to leave the messages what they are and make
  533. >every program return a meaningful error number. A seperate program could
  534.  
  535. This remindes me about real old Hewlett Packard BASIC interpeter...
  536. ???
  537. RUN
  538. ERROR 4578 IN LINE 8083
  539.  
  540. >figure out which verbose message belongs to that number. That saves several K's
  541. >of text for each program and makes translation to foreign langauges much
  542. >easier. The user who uses such a tool gradually learns to associate the terse
  543.  
  544. I suppose you have heard about shared libraries ;-).
  545.  
  546. Seriously, I would really appreciate a call like eprintf that accepts the same
  547. arguments as printf but also has staff like %n for program name, %m for message,
  548. %p for callers PID etc. This would encourage people to use more meaninfull diagnostics.
  549.  
  550. Oleg
  551.  
  552. -----------------------------
  553.  
  554. From: Stephen Riehm <smr@pki-nbg.philips.de>
  555. Subject: Re: The Problem with UNIX
  556. Date: 17 Nov 92 12:39:31 GMT
  557. Sender: news@pki-nbg.philips.de
  558. To:       unix-wizards@sem.brl.mil
  559.  
  560. oleg@gd. (Oleg Kibirev) writes:
  561.  
  562. > Seriously, I would really appreciate a call like eprintf that accepts
  563. > the same arguments as printf but also has staff like %n for program
  564. > name, %m for message, %p for callers PID etc. This would encourage people
  565. > to use more meaningful diagnostics.
  566.  
  567. It already exists:
  568.     fprintf(stderr,"%s[%d]: %s\n", argv[0], (int)getpid(), "message");
  569.  
  570. Of course there are the usual 50,000 different ways of formatting this
  571. same line, but the code is there, the problem is that people don't use
  572. it. The second problem is that there are guys out there who get
  573. wonderful new schemes in their heads, and insist that everyone working
  574. on their project use this wonderful new scheme (I do this sometimes,
  575. but I am leveling out in my young age), there is no STANDARD way of
  576. producing errors, printing to stderr is about as close as you get. I
  577. really feel that it just takes a very small amount of clear thinking
  578. combined with an even smaller amount of effort to do it RIGHT (but
  579. according to whose definition of RIGHT?).
  580.  
  581. Of course if you really want to "sell the product", you should be
  582. using NLS (or some equivalent), then your code is reduced when
  583. printing errors, and you don't need to change the code to use it with
  584. heaps of different languages.
  585.  
  586. while on the subject of international character sets, to read the name
  587. of my city in my .sig below, you will need the ISO-8859-1 (latin1)
  588. character set :-) (ASCII + 1 bit)
  589.  
  590. catchya
  591.  
  592.  -----------------------------------------------------------------
  593. Stephen Riehm        Configuration Management       _-_|\ 
  594. smr@pki-nbg.philips.de    Philips Kommunikations Industrie  /     \
  595. Work: +49 911 526 2975    N|rnberg, Germany          \_.-.!/
  596. Fax:  +49 911 526 3678    "I was there, now I am here!"           v 
  597. "My company speaks another language, I CAN'T speak on its' behalf"
  598.  
  599. -----------------------------
  600.  
  601. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  602. Subject: Re: The Problem with UNIX
  603. Date: 17 Nov 92 13:03:41 GMT
  604. To:       unix-wizards@sem.brl.mil
  605.  
  606. In article <1992Nov13.232927.2742@informix.com>, hartman@informix.com (Robert Hartman) writes:
  607.  
  608. [quoted stuff deleted - irrelevant]
  609. > You know, I see merit in both of these approaches.  The command line
  610. > parser should be a library routine in stdio.
  611.  
  612. (Why stdio?  It's got nothing to do with I/O.)
  613.  
  614. > The shell should use command and option completion prior to exec,
  615.  
  616. Where is it supposed to find the information it'll need to do that,
  617. such as what options the program takes, which arguments are files and
  618. which are strings, etc?
  619.  
  620.                     der Mouse
  621.  
  622.                 mouse@larry.mcrcim.mcgill.edu
  623.  
  624. -----------------------------
  625.  
  626. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  627. Subject: Re: The Problem with UNIX
  628. Date: 17 Nov 92 13:22:56 GMT
  629. To:       unix-wizards@sem.brl.mil
  630.  
  631. In article <1992Nov14.153857.1666@global.hacktic.nl>, peter@global.hacktic.nl (Peter Busser) writes:
  632. > mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  633. >> files?  Consider instead "echo a b > b".[%]
  634. > I did just that with bash and it didn't complain.  But yet, echo is
  635. > often a built-in command.
  636.  
  637. Did you read my footnote?  It addresses exactly that.
  638.  
  639. >> Is "acceptance in the general microcomputer market place" something
  640. >> we wish for UNIX?
  641. > Acceptance in the general microcomputer market also means more
  642. > software, lower prices, more support (every (S)VGA card ships with
  643. > Windows drivers, but X11 support is harder to get),
  644.  
  645. Speaking purely personally....
  646.  
  647. More software?  The sort of software that popularity will bring will of
  648. necessity be mass-market software, which is (a) extortware, (b) dumbed
  649. down to suit the mass market, and (c) usually does something I'm not
  650. the least bit interested in anyway.
  651.  
  652. Lower prices?  For what?  I will never pay for software, and there's no
  653. reason I can't use mass-market hardware (like, say, a 486 box).
  654.  
  655. More support?  There's no way in hell I'm even going to be working at a
  656. place that can afford to buy the level of support that just having the
  657. source gives, never mind actually paying it myself.  (I once was on a
  658. consulting job at an organization that had, to support the job in
  659. question, bought support from the relevant vendor.  About all we ever
  660. got out of them was "uh, that's a good question, let me get back to
  661. you".  I can think of only one thing they ever told us that we hadn't
  662. already found out for ourselves by UTSLing (they had, sensibly, also
  663. obtained the source), and that thing was incidental rather than being
  664. what we asked.)
  665.  
  666. > more UNIX related jobs (or do you prefer to use Windows at work? :),
  667. > more UNIX everything.
  668.  
  669. Possibly a point, though there's still the danger that they'll not be
  670. the-UNIX-I-love jobs and everything but UNIX-dumbed-down-for-the-masses
  671. jobs and everything.
  672.  
  673.                     der Mouse
  674.  
  675.                 mouse@larry.mcrcim.mcgill.edu
  676.  
  677. -----------------------------
  678.  
  679. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  680. Subject: Re: The Problem with UNIX
  681. Date: 17 Nov 92 13:25:17 GMT
  682. To:       unix-wizards@sem.brl.mil
  683.  
  684. In article <1992Nov14.151318.1376@global.hacktic.nl>, peter@global.hacktic.nl (Peter Busser) writes:
  685. > acourtny@unix1.tcd.ie (Antony A. Courtney) writes:
  686.  
  687. >> and structural elegance of that other system once called UNIX.
  688. > That's a good point!  For instance, instead of using the creat()
  689. > system call, which creates a file with given permissions, they added
  690. > a parameter open() to duplicate the functionality of creat().
  691.  
  692. That's a point.  They should have had the guts to dump creat() when
  693. they folded it into open().  (Or are you saying they shouldn't have
  694. extended open?  Would you prefer to have a separate syscall for each
  695. permutation of flag bits in the second argument to current open()?)
  696.  
  697.                     der Mouse
  698.  
  699.                 mouse@larry.mcrcim.mcgill.edu
  700.  
  701. -----------------------------
  702.  
  703. From: Shobhana <shobhana@shakti.ncst.ernet.in>
  704. Subject: Re: The Problem with UNIX
  705. Date: 17 Nov 92 13:36:05 GMT
  706. To:       unix-wizards@sem.brl.mil
  707.  
  708. In article <1992Nov14.153857.1666@global.hacktic.nl> peter@global.hacktic.nl (Peter Busser) writes:
  709. >mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  710. >
  711. >>    cat a b > b
  712. >
  713. >>files?  Consider instead "echo a b > b".[%]
  714. >
  715. >I did just that with bash and it didn't complain. But yet, echo is often a
  716. >built-in command. It complained about 'cat a b >b' but didn't complain about
  717. >'cat a b|cat>b' so it's not perfect.
  718.  
  719. I haven't followed this thread from the beginning, so if I am
  720. saying something irrelevant let me know (oh, I'm sure you will ;-)
  721.  
  722. Anyway, cat's complaint about input and output file being the same
  723. is produced by cat(1) and *not* by .*sh(1). So what *is* the problem?
  724.  
  725. I presume that there is a school of thought which says that *sh should
  726. detect such problems and let you know about it. IMHO, the command
  727. interpreter *cannot* and should not make such decisions. e.g the name
  728. of a file means different things to cat(1) and echo(1)---sh(1) has *no*
  729. way of knowing this and should not even attempt to guess.
  730.  
  731. Regards
  732.  
  733. -----------------------------
  734.  
  735. From: Rich Kulawiec <rsk@gynko.circ.upenn.edu>
  736. Subject: Re: The Problem with UNIX
  737. Date: 17 Nov 92 13:56:28 GMT
  738. Sender: news@NOC2.DCCS.UPENN.EDU
  739. Followup-To: comp.unix.wizards
  740. Nntp-Posting-Host: gynko.circ.upenn.edu
  741. To:       unix-wizards@sem.brl.mil
  742.  
  743. In article <1992Nov16.195733.14842@tamsun.tamu.edu> ski8032@tamsun.tamu.edu (The Man Behind The Curtain) writes:
  744. >While some Un*x weenies may scoff at those who choose other alternatives,
  745. >doing so only hurts Un*x, for by expanding and growing it can only improve.
  746.  
  747. This is a fascinating assertion; I submit that the historical record
  748. shows, in excruciating detail, that the expansion and growth of Unix
  749. has all-but-destroyed its simple elegance.  The gentle reader is
  750. invited to read a v6 or v7 manual (which will only take an afternoon)
  751. and then compare it to SunOS 4.1.3, for instance, with a careful eye
  752. to the functionality/overhead ratio in both systems.
  753.  
  754. ---Rsk
  755.  
  756. -----------------------------
  757.  
  758. From: Mike Bandy <bandy@aplcomm.jhuapl.edu>
  759. Subject: Re: The Problem with UNIX
  760. Date: 17 Nov 92 17:32:11 GMT
  761. To:       unix-wizards@sem.brl.mil
  762.  
  763. mike@nttor.uucp (Mike Hollander) writes:
  764.  
  765. >In article <1992Nov9.172715.16367@cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes:
  766. >>
  767. >>I am doing research on UNIX command line interface problems.
  768. >>I am sure everyone has his/her favorite UNIX troubles, would
  769. >>you post or email me what's your favorites?  What should have
  770. >>been done by UNIX to resolve that problem in general?
  771. >>
  772.  
  773. >Things that bother me about the command line (I'm using Motorola
  774. >UNIX System V/68 Release 3.71 running a Korn shell using vi-type
  775. >command line editing on a VT420), in no particular order:
  776.  
  777. >1) It is possible to backspace over the prompt.
  778. >2) Running over past the end of the line onto the next line does not 
  779. >   allow you to backspace back to the previous line, and if you     
  780. >   backspace at the last column of a line it is possible to miss
  781. >   a character and therefore not backspace over what you think
  782. >   you are backspacing over.
  783. >3) It doesn't seem possible to map the arrow keys on the keyboard
  784. >   to enable you to press up arrow to get the previous command, or
  785. >   to use left arrow to move backwards through the line.
  786. >4) It doesn't seem possible to store macros that could be run with
  787. >   a single keypress.
  788. >5) The function keys don't do anything and cannot be made to do
  789. >   anything on the command line.
  790. >6) The insert and remove keys cannot be made to place you in insert
  791. >   mode or remove characters.
  792.  
  793. >That's a short list off the top off my head. If anyone has methods
  794. >to fix these complaints please feel free to respond!
  795.  
  796. Run VMS!  The VMS command line interpretor does all these things flawlessly.
  797. Being an AC/DC kind of guy (WRT operating systems, that is) I can say that
  798. the one thing I really miss when I use Unix is the command editing using the
  799. arrow keys.  The Ultrix system I used at grad school allowed the command
  800. to be recalled with the up/down keys, cursor positioned at the point
  801. that needed changing via left/right arrows, etc.  Admitedly, I'm not a real
  802. power user, but I have never been able to remember how to recall/edit past the 
  803. previous using the "^" sequence.  And the fact that it does the edit, then
  804. executes it, rather than waiting for a carriage return has always disturbed me.
  805.  
  806. I know I'm setting myself up to be flamed; bring it on.
  807.  
  808. >Mike Hollander | mike@nttor.UUCP
  809. -- 
  810.  
  811.     Mike Bandy
  812.     bandy@aplcomm.jhuapl.edu
  813.     Johns Hopkins University / Applied Physics Lab
  814.  
  815. -----------------------------
  816.  
  817. From: Steve McDowell <mcdowell@exlog.com>
  818. Subject: Re: The Problem with UNIX
  819. Date: 17 Nov 92 19:35:12 GMT
  820. To:       unix-wizards@sem.brl.mil
  821.  
  822. In message <BxvFDo.5G7@netnews.jhuapl.edu> bandy@netnews.jhuapl.edu (Mike Bandy) writes:
  823. >
  824. > Run VMS!  The VMS command line interpretor does all these things flawlessly.
  825.  
  826. People run UNIX for a reason. VMS isn't usually an alternative. 
  827.  
  828. > The Ultrix system I used at grad school allowed the command
  829. > to be recalled with the up/down keys, cursor positioned at the point
  830. > that needed changing via left/right arrows, etc.  Admitedly, I'm not a real
  831. > power user, but I have never been able to remember how to recall/edit past the 
  832. > previous using the "^" sequence.  And the fact that it does the edit, then
  833. > executes it, rather than waiting for a carriage return has always disturbed me.
  834.  
  835. Then get a new shell. Ksh comes to mind. And it comes with most SysV systems. And
  836. it runs on most BSD-derived systems. I think the point's been made before that 
  837. the user interface is *not* the operating system, and that (to me) is one of the 
  838. many joys of UNIX.
  839.  
  840. > I know I'm setting myself up to be flamed; bring it on.
  841.  
  842. No flames, just calm rational discussion. Whether "running VMS" is rational I'll
  843. leave up to you.
  844.  
  845. -- 
  846. Steve McDowell             . . . . o o o o o         Opinions are 
  847. Exlog, Inc.                      _____      o         mine, not my 
  848. mcdowell@exlog.com      _____====  ]OO|_n_n__][.        employers..
  849.                [_________]_|__|________)<   
  850.  
  851. -----------------------------
  852.  
  853. From: Pete Hardie <phardie@nastar.uucp>
  854. Subject: Re: The Problem with UNIX
  855. Date: 17 Nov 92 20:58:36 GMT
  856. To:       unix-wizards@sem.brl.mil
  857.  
  858. In article <Bxtx2o.Bo7@fig.citib.com> gjb@fig.citib.com (Greg Brail) writes:
  859. >Not too many years ago a bunch of Navy crewmen who hadn't read all the FMs
  860. >on the USS Vincennes blew up an airliner, killing hundreds of innocent people.
  861.  
  862. Wasn't that airliner also using a transponder scavenged from a military jet,
  863. giving it a military 'profile' on radar?
  864.  
  865. >UNIX is becoming more and more common in commercial environments, but this 
  866. >attitude will drive people away. Fortunately, it's possible to give "Joe 
  867. >User" a reasonable interface and save the command line for the hackers.
  868.  
  869. Sometimes a command line *is* the reasonable interface.
  870.  
  871. >That's why I have a Macintosh at home.
  872.  
  873. Try this:  list all the C code files in a given directory on your Mac, using
  874. the iconinc interface.  Only files with '.c' suffix.
  875.  
  876.  
  877. -- 
  878. Pete Hardie:  phardie@nastar  (voice) (404) 497-0101
  879. Digital Transmission Systems, Inc., Duluth GA
  880. Member, DTS Dart Team           |  cat * | egrep -v "signature virus|infection" 
  881. Position:  Goalie               |
  882.  
  883. -----------------------------
  884.  
  885. From: Robert Hartman <hartman@informix.com>
  886. Subject: Re: The Problem with UNIX
  887. Date: 17 Nov 92 23:09:45 GMT
  888. Sender: Usenet News <news@informix.com>
  889. To:       unix-wizards@sem.brl.mil
  890.  
  891. In article <1992Nov17.130341.8004@thunder.mcrcim.mcgill.edu> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  892. >In article <1992Nov13.232927.2742@informix.com>, hartman@informix.com (Robert Hartman) writes:
  893. >
  894. >[quoted stuff deleted - irrelevant]
  895. >> You know, I see merit in both of these approaches.  The command line
  896. >> parser should be a library routine in stdio.
  897. >
  898. >(Why stdio?  It's got nothing to do with I/O.)
  899.  
  900. I suppose you're right.  This is really extended processing of argv.
  901.  
  902. >> The shell should use command and option completion prior to exec,
  903. >
  904. >Where is it supposed to find the information it'll need to do that,
  905. >such as what options the program takes, which arguments are files and
  906. >which are strings, etc?
  907.  
  908. Well, at start-up, the shell could read a file with this information
  909. and create a hash table.  I'm sure other people can think of other
  910. ways to do it.
  911.  
  912. -r
  913.  
  914. -----------------------------
  915.  
  916. From: peter da silva <peter@ferranti.com>
  917. Subject: Re: The Problem with UNIX
  918. Date: 17 Nov 92 23:28:32 GMT
  919. To:       unix-wizards@sem.brl.mil
  920.  
  921. In article <1992Nov13.091914.6799@thunder.mcrcim.mcgill.edu> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  922. > Yes, it might.  So what?  Is "acceptance in the general microcomputer
  923. > market place" something we wish for UNIX?
  924.  
  925. If we want to keep being able to buy nice cheap UNIX systems with decent
  926. performance for the long-term, yes.
  927.  
  928. I would say that a friendly shell that does all the command parsing (like
  929. DCL does) would be quite a nice touch.
  930. -- 
  931. Peter da Silva / 77487-5012 USA / +1 713 274 5180
  932. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  933. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  934. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  935.  
  936. -----------------------------
  937.  
  938. From: Leslie Mikesell <les@chinet.chi.il.us>
  939. Subject: Re: The Problem with UNIX
  940. Date: 17 Nov 92 23:48:05 GMT
  941. To:       unix-wizards@sem.brl.mil
  942.  
  943. In article <1992Nov17.132517.9313@thunder.mcrcim.mcgill.edu> mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  944.  
  945. >That's a point.  They should have had the guts to dump creat() when
  946. >they folded it into open().  (Or are you saying they shouldn't have
  947. >extended open?  Would you prefer to have a separate syscall for each
  948. >permutation of flag bits in the second argument to current open()?)
  949.  
  950. I'd prefer to have more arguments - for example to control locking the
  951. file atomically with the open().  It just seems so inelegant to open
  952. a file, possibly creating it, and then to have to fight with other
  953. processes over who has control of it.  And the traditional unix solution
  954. of using separate lockfiles has a worse problem: there's no way to
  955. remove a stale one safely.
  956.  
  957. Les Mikesell
  958.   les@chinet.chi.il.us
  959.  
  960. -----------------------------
  961.  
  962. From: Leslie Mikesell <les@chinet.chi.il.us>
  963. Subject: Re: The Problem with UNIX
  964. Date: 18 Nov 92 00:01:27 GMT
  965. To:       unix-wizards@sem.brl.mil
  966.  
  967. In article <1992Nov17.021538.25729@mole-end.matawan.nj.us> mat@mole-end.matawan.nj.us writes:
  968. >> Do yourself a favor and compile ELM.
  969. >
  970. >This user says `bletch!'  I've got ELM.  It threw away a valuable piece of
  971. >mail on me because the mail included another mail header.
  972.  
  973. This is fixed in 2.4 if you tell it your mailer uses the Content-Length:
  974. headers.  It also won't blow up when the mail contains null characters
  975. now.
  976.  
  977. >Right now I have
  978. >a non-elm mailbox with a message in it that ELM will present out of order.
  979.  
  980. What is your sort order?  Set it to 'reverse mailbox' if you want the
  981. stock mail order (and then it doesn't depend on the mailer getting the
  982. date format right either).
  983.  
  984. >ELM's handling of the cursor keys is just plain wrong. ... ... ...
  985. >What?  It's just fine for you and you haven't noticed any problems?
  986.  
  987. Odd maybe, but it works for me.  Up/down go by messages, left/right
  988. go by screens.  I always use j & k anyway.  What happens for you?
  989.  
  990. >My favorite way to deal with mail is to go into vi, create a mail command
  991. >with a here document filled with blank lines and ending in `x', and 1G!Gksh
  992. >the whole thing.  It subjects me to the fewest bogons of anything I've got.
  993. >(Oh, you don't like vi?  Fine with me.
  994.  
  995. Actually I like vi but I don't see the point of that exercise.  How about
  996. cat /usr/mail/you?  Or more useful: less /usr/mail/you (pg if you don't
  997. have less).
  998.  
  999. Les Mikesell
  1000.   les@chinet.chi.il.us
  1001.  
  1002. -----------------------------
  1003.  
  1004. From: peter da silva <peter@ferranti.com>
  1005. Subject: Re: The Problem with UNIX
  1006. Date: 18 Nov 92 00:14:00 GMT
  1007. To:       unix-wizards@sem.brl.mil
  1008.  
  1009. In article <1992Nov12.193707.27532@chpc.utexas.edu> michael@chpc.utexas.edu (Michael Lemke) writes:
  1010. > This would all be
  1011. > solved if there were *one* system function that is used by all programs
  1012. > instead of having every program duplicate more or less the same
  1013. > functionality with different success.
  1014.  
  1015. See Eric Allman's "Parseargs" utility. It's great.
  1016.  
  1017. I have it set up so the same program on UNIX accepts:
  1018.  
  1019.     foo -abc -d bar
  1020. or
  1021.     foo +apple +banana +carrot +diet bar
  1022.  
  1023. And on AmigaOS (with a different convention):
  1024.  
  1025.     foo apple banana carrot diet=bar
  1026. or
  1027.     foo a b c d=bar
  1028.  
  1029. And it's also been extended to VMS and DOS:
  1030.  
  1031.     foo/apple/banana/carrot/diet=bar
  1032. or
  1033.     foo/apple/banana/carrot bar/diet
  1034. or
  1035.     foo/a/b/c bar/d
  1036. -- 
  1037. Peter da Silva / 77487-5012 USA / +1 713 274 5180
  1038. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  1039. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  1040. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  1041.  
  1042. -----------------------------
  1043.  
  1044. From: peter da silva <peter@ferranti.com>
  1045. Subject: Re: The Problem with UNIX
  1046. Date: 18 Nov 92 00:22:04 GMT
  1047. To:       unix-wizards@sem.brl.mil
  1048.  
  1049. In article <-ml1H31!ua@atlantis.psu.edu> barr@pop.psu.edu (David Barr) writes:
  1050. > >This would all be
  1051. > >solved if there were *one* system function that is used by all programs
  1052. > >instead of having every program duplicate more or less the same
  1053. > >functionality with different success.
  1054.  
  1055. > You mean like getopt(3)?
  1056.  
  1057. getopt is practically worthless. It doesn't do enough parsing to be worth
  1058. using, and doesn't provide any sort of useful diagnostics. With the example
  1059. in my last message, you'd say:
  1060.  
  1061.     foo -d
  1062. and get
  1063.     foo: required argument to -d (diet) missing.
  1064.     Usage: foo [-abc] [-d diet]
  1065.  
  1066. And by setting $VERBOSE it'd add 
  1067.  
  1068.         -a    Eat an apple.
  1069.         -b    Eat a banana.
  1070.         -c    Eat a carrot.
  1071.         -d diet    Use diet plan in file <diet>
  1072.  
  1073. Let's try (this is a slightly older version of the library):
  1074.  
  1075. % //xds13/usr1/xds/src/docindex/docindex
  1076. docindex: MasterFile ('master' files) required for -m flag
  1077. docindex: IndexFile ('index' files) required for -i flag
  1078. docindex: HistoryFile ('history' files) required for -h flag
  1079. Usage: docindex -m <MasterFile>... -i <IndexFile>... -h <HistoryFile>... \
  1080.     [-p <MsgidPattern>] [-v] [-q]
  1081.  
  1082. With the source:
  1083.  
  1084. struct arglist *MasterFiles = NULL;
  1085. struct arglist *HistoryFiles = NULL;
  1086. struct arglist *IndexFiles = NULL;
  1087. char *msgid_pattern = "<doc.";
  1088. BOOL Verbose = 0;
  1089. BOOL Quiet = 0;
  1090.  
  1091. ARGDESC    Args[] =
  1092. {
  1093. 'm', ARGREQ|ARGLIST,listStr, __ &MasterFiles,"MasterFile ('master' files)",
  1094. 'i', ARGREQ|ARGLIST,listStr, __ &IndexFiles,"IndexFile ('index' files)",
  1095. 'h', ARGREQ|ARGLIST,listStr, __ &HistoryFiles,"HistoryFile ('history' files)",
  1096. 'p', ARGOPT, argStr, __&msgid_pattern, "MsgidPattern (magic string for msgid)",
  1097. 'v', ARGOPT, argBool, __&Verbose, "Verbose (report database changes)",
  1098. 'q', ARGOPT, argBool, __&Quiet, "Quiet (about missing data or index files)",
  1099. ENDOFARGS
  1100. };
  1101.  
  1102. main(argc, argv)
  1103.     int argc;
  1104.     char **argv;
  1105. {
  1106.     parseargs(argv, Args);
  1107.     ...
  1108. -- 
  1109. Peter da Silva / 77487-5012 USA / +1 713 274 5180
  1110. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  1111. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  1112. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  1113.  
  1114. -----------------------------
  1115.  
  1116. From: peter da silva <peter@ferranti.com>
  1117. Subject: Re: The Problem with UNIX
  1118. Date: 18 Nov 92 00:31:24 GMT
  1119. To:       unix-wizards@sem.brl.mil
  1120.  
  1121. In article <1992Nov13.094336.2341@aber.ac.uk> btk@aber.ac.uk (Ben Ketteridge) writes:
  1122. > For example, just to take the 'cat a b > b' problem, you are suggesting IMHO
  1123. > that the shell shouldn't check redirection of output against the input
  1124. > and warn the user in this case.
  1125.  
  1126. How does the shell know that the "b" argument to cat is the same as the "b"
  1127. output file? Because the file exists?
  1128.  
  1129. touch b a 
  1130. cat a b > b 
  1131. b: File exists.
  1132.  
  1133. What's your problem?
  1134. -- 
  1135. Peter da Silva / 77487-5012 USA / +1 713 274 5180
  1136. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  1137. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  1138. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  1139.  
  1140. -----------------------------
  1141.  
  1142. From: "Bryan S. So" <so@brownie.cs.wisc.edu>
  1143. Subject: Re: The Problem with UNIX
  1144. Date: 18 Nov 92 02:04:02 GMT
  1145. Sender: The News <news@cs.wisc.edu>
  1146. To:       unix-wizards@sem.brl.mil
  1147.  
  1148. In response to my suggestion that the shell should help the user
  1149. buffer "b" when it sees the command "cat a b > b",
  1150. mju@mudos.ann-arbor.mi.us (Marc Unangst) writes:
  1151.  
  1152. >There are also problems with buffering the input.  What if the "b" is
  1153. >a FIFO or a device, not a regular file?  In that case, "cat b > b" is
  1154. >perfectly valid and not at all abnormal.  What if "b" is a Unix-domain
  1155. >socket, and the program at the other end writes something and then
  1156. >waits for a response before closing the file?  Your program will never
  1157. >run, because Unix will be sitting there waiting to read the "rest" of
  1158. >the input file before giving the program control.
  1159.  
  1160.  If "b" is a FIFO, it may make "cat b > b" syntactically or even
  1161.  semantically valid.  But how would it make that psychologically
  1162.  valid?
  1163.  
  1164.  I suppose "cat a > a" or some variance of it is documented 
  1165.  somewhere as "pitfalls" and users warned.  So, whoever thought
  1166.  up a FIFO "b", such that the proper usage is "cat b > b", is 
  1167.  just absurd.  Can you give a practical application for such use?
  1168.  
  1169.  
  1170. Bryan
  1171.  
  1172. -----------------------------
  1173.  
  1174. From: Peter Busser <peter@global.hacktic.nl>
  1175. Subject: Re: The Problem with UNIX
  1176. Date: 18 Nov 92 02:21:27 GMT
  1177. To:       unix-wizards@sem.brl.mil
  1178.  
  1179. oleg@gd. (Oleg Kibirev) writes:
  1180.  
  1181. >This remindes me about real old Hewlett Packard BASIC interpeter...
  1182. >???
  1183. >RUN
  1184. >ERROR 4578 IN LINE 8083
  1185.  
  1186. That's what IBM did for years (for instance the 5288) and still does (OS/2)!
  1187. But that's not what I meant. Now programs call exit() to return an error code
  1188. to the parent process. I meant to use THAT value. However, I realize that it
  1189. is not easy to get that error number and it doesn't have a standard meaning.
  1190.  
  1191. >>figure out which verbose message belongs to that number. That saves several K's
  1192. >>of text for each program and makes translation to foreign langauges much
  1193. >>easier. The user who uses such a tool gradually learns to associate the terse
  1194. >I suppose you have heard about shared libraries ;-).
  1195.  
  1196. Yes, but a text file is much easier to edit than a shared library...
  1197.  
  1198. -----------------------------
  1199.  
  1200. From: "Bryan S. So" <so@brownie.cs.wisc.edu>
  1201. Subject: Re: The Problem with UNIX
  1202. Date: 18 Nov 92 02:26:21 GMT
  1203. Sender: The News <news@cs.wisc.edu>
  1204. To:       unix-wizards@sem.brl.mil
  1205.  
  1206.  
  1207. Concerning whether "cat a b > b" should prepend or give warning or does
  1208. whatever it's now doing,
  1209.  
  1210. In article <1992Nov13.094336.2341@aber.ac.uk> btk@aber.ac.uk (Ben Ketteridge) writes:
  1211.  
  1212. ]     Actually, I think this example should work!  It is a perfectly 
  1213. ]     reasonable request.  
  1214.  
  1215. Another opinion says,
  1216.  
  1217. In article <17934@autodesk.COM> dansmith@Autodesk.COM (Daniel Smith) writes:
  1218. )
  1219. )    No it isn't, consider my "glasses of water" theorem:
  1220. >
  1221. )
  1222. )         |         |          |           |
  1223. )         |~~~~~~~~~|          |~~~~~~~~~~~|
  1224. )         |         |          |           |
  1225. )         |         |          |           |
  1226. )         |    A    |          |    B      |
  1227. )         |         |          |           |
  1228. )          \_______/            \_________/
  1229. )
  1230. )
  1231. )    Ok, B can get bigger (i.e. a goblet, or a pitcher) to accept water
  1232. )from A, but what do you mean to do with B's original water?  I think
  1233. )B's original water must go to:
  1234. )
  1235. )         |      |_
  1236. )         |~~~~~~| \
  1237. )         |   C  | ||
  1238. )         |      |_/
  1239. )          \____/
  1240. )
  1241. )    C, an arbitrary coffee cup in n-dimensional cupboard space, which
  1242. )can expand to hold any amount of liquid found in A & B.  I think you're
  1243. )suggesting throwing B's water up in the air while A's water goes to B,
  1244. )and having B's water splash on top.  This violates most of the laws of kitchen
  1245. )physics (see Child, Julia "Fractal Baking") and just makes a big mess.
  1246. )The third container (Tupperware or otherwise) saves the day.  With
  1247. )this example, you could pour all of the water from C back into B (mv)
  1248. )and then put C in the dishwasher (rm).
  1249.  
  1250.  
  1251. I would think,
  1252.  
  1253.  This glasses of water theorem is biased in a sense that Cup C can
  1254.  expand to hold any amount of liquid while Cup A and Cup B cannot.
  1255.  
  1256.  My mental model interpret a file as "n-dimensional cupboard space,
  1257.  which can expand to hold any amount of liquid".  So, "cat a b > b"
  1258.  is reasonable.  
  1259.  
  1260.  
  1261. Bryan
  1262.  
  1263. -----------------------------
  1264.  
  1265. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  1266. Subject: Re: The Problem with UNIX
  1267. Date: 18 Nov 92 11:06:09 GMT
  1268. To:       unix-wizards@sem.brl.mil
  1269.  
  1270. In article <1992Nov16.234721.3224@nic.csu.net>, oleg@gd. (Oleg Kibirev) writes:
  1271.  
  1272. > Seriously, I would really appreciate a call like eprintf that accepts
  1273. > the same arguments as printf but also has staff like %n for program
  1274. > name, %m for message, %p for callers PID etc.
  1275.  
  1276. All of these are available:
  1277.  
  1278. %s    argv[0],
  1279. %s    ((errno>0)&&(errno<sys_nerr))?sys_errlist[errno]:"Unknown error"
  1280. %d    getpid()
  1281.  
  1282. Given the ugliness (and incompleteness - it should include the error
  1283. number in the "unknown error" clause) of the second one, I hacked on
  1284. printf to add a %m spec, which takes an errno and generates the
  1285. corresponding message.  Makes printing error messages ever so much
  1286. easier to write...
  1287.  
  1288.     fprintf(stderr,"%s: can't open %s: %m\n",argvec[0],fn,errno);
  1289.  
  1290. Of course, this helps only when errno contains something useful.  Far
  1291. too many things don't do this - fopen, for example, does not have
  1292. anything to do with errno as any part of its contract....
  1293.  
  1294.                     der Mouse
  1295.  
  1296.                 mouse@larry.mcrcim.mcgill.edu
  1297.  
  1298. -----------------------------
  1299.  
  1300. From: Matthias Urlichs <urlichs@smurf.sub.org>
  1301. Subject: Re: Detecting if running under chroot
  1302. Date: 16 Nov 92 17:23:47 GMT
  1303. NNTP-Posting-Host: 127.0.0.1
  1304. To:       unix-wizards@sem.brl.mil
  1305.  
  1306. In comp.unix.wizards, article <5076@prcrs.prc.com>,
  1307.   paul@prcrs.prc.com (Paul Hite) writes:
  1308. > Well I've played around some public access bbs systems that thew me into a
  1309. > chroot env.  From a practical standpoint, I quickly noticed how little I could
  1310. > do.  It just had the "feel" of a chroot environment.  But I guess that you're
  1311. > looking for a more formal method.  I would examine the inode of the root.  I
  1312. > think something like "ls -id /" should do it.  But I still say that most
  1313. > chroot'd environments that I have seen don't really need much effort to
  1314. > detect.
  1315. Doesn't work if the chrooted environment resides on the root of another file
  1316. system.
  1317.  
  1318. I'd say that any way to detect a chrooted environment from first principles,
  1319. i.e. other than finding a local news server but no newsspool, is declared
  1320. a bug in the OS.
  1321.  
  1322. -- 
  1323. What if everything is an illusion and nothing exists?  In that case, I
  1324. definitely overpaid for my carpet.
  1325.         -- Woody Allen, "Without Feathers"
  1326. -- 
  1327. Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
  1328. Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
  1329.  
  1330. -----------------------------
  1331.  
  1332. From: Oleg Kibirev <oleg@gd>
  1333. Subject: Re: Detecting if running under chroot
  1334. Date: 17 Nov 92 07:17:03 GMT
  1335. Nntp-Posting-Host: gd.cs.csufresno.edu
  1336. To:       unix-wizards@sem.brl.mil
  1337.  
  1338. In article <1e8lf3INN7q6@smurf.smurf.sub.org> urlichs@smurf.sub.org (Matthias Urlichs) writes:
  1339. >In comp.unix.wizards, article <5076@prcrs.prc.com>,
  1340. >  paul@prcrs.prc.com (Paul Hite) writes:
  1341. >> 
  1342. >> Well I've played around some public access bbs systems that thew me into a
  1343. >> chroot env.  From a practical standpoint, I quickly noticed how little I could
  1344. >> do.  It just had the "feel" of a chroot environment.  But I guess that you're
  1345. >> looking for a more formal method.  I would examine the inode of the root.  I
  1346. >> think something like "ls -id /" should do it.  But I still say that most
  1347. >> chroot'd environments that I have seen don't really need much effort to
  1348. >> detect.
  1349. >> 
  1350. >Doesn't work if the chrooted environment resides on the root of another file
  1351. >system.
  1352. >
  1353. >I'd say that any way to detect a chrooted environment from first principles,
  1354. >i.e. other than finding a local news server but no newsspool, is declared
  1355. >a bug in the OS.
  1356. >
  1357. Yup. Consider chroot /.
  1358.  
  1359. Oleg
  1360.  
  1361. -----------------------------
  1362.  
  1363. From: Mark Sienkiewicz <mark@roissy.umd.edu>
  1364. Subject: Re: HELP! problem with tar PC <-> SUN
  1365. Date: 16 Nov 92 19:01:46 GMT
  1366. Sender: news@umd5.umd.edu
  1367. To:       unix-wizards@sem.brl.mil
  1368.  
  1369. In article <1992Nov12.234822.1273@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
  1370. >This probably still won't make him happy. He'll want to read tapes
  1371. >that were created with a blocking factor of 20 using a blocking
  1372. >factor of 20 and tapes that were created with a blocking factor of
  1373. >2 using a blocking factor of 2. In other words, he wants tar to
  1374.  
  1375. I agree the client is being unreasonable, but I can't remember _ever_
  1376. working for a client who was not unreasonable at least some of the time.
  1377.  
  1378. >be clairvoyent. If this is the case, all you can do is tell him that
  1379. >he wants something impossible and hope you don't lose the business.
  1380.  
  1381. On most systems I've used, you can detect the block size of a tape by
  1382. doing something like:
  1383.  
  1384.     char buffer[BIGGEST_POSSIBLE_RECORD_SIZE];
  1385.  
  1386.     n=read(fd,buffer,sizeof(buffer));
  1387.     printf("block size is %d bytes\n",n);
  1388.  
  1389. Mark S.
  1390.  
  1391. -----------------------------
  1392.  
  1393. From: Doug Walker <walker@superboy.jsc.nasa.gov>
  1394. Subject: Still x_cdplayer problems
  1395. Date: 16 Nov 92 21:01:46 GMT
  1396. Sender: USENET News System <news@aio.jsc.nasa.gov>
  1397. To:       unix-wizards@sem.brl.mil
  1398.  
  1399. Only got one response from my last post and that waas not the problem
  1400. but thank you anyway.
  1401.  
  1402. Here is my problem:
  1403.  
  1404. I am trying to get xcdplayer to work on a tatung compstation 25 running
  1405. sunos 4.1.2.  It is a Hitachi cdplayer.  When I run xcdplayer I get
  1406.  
  1407. superboy 1 > xcdplayer
  1408. ioctl(cdromreadtochdr): I/O error
  1409.  
  1410. I have gone back to the release cdrom and pulled the x_cdplayer that
  1411. came with 4.1.2.  If I run it after having already inserted the cd I get
  1412. the response:
  1413.  
  1414. I/O Error
  1415.  
  1416. If I run it with no cd in the player I get the application up but then
  1417. upon inserting the cd it does not recognize that there is a cd in there.
  1418.  
  1419. The message
  1420.  
  1421. sr0: logical unit not ready
  1422.  
  1423. appears in the console wheneveer I try to play the cd.
  1424.  
  1425. Help, please.
  1426.  
  1427. Thank you.
  1428.  
  1429. -- 
  1430. Doug                   
  1431.  
  1432. Ask not what your country can do for you, but what you can 
  1433. do for your country.  - JFK
  1434.  
  1435. -----------------------------
  1436.  
  1437. From: Andrew Luck <p00078@psilink.com>
  1438. Subject: Secondary Groups Failure Intermittent
  1439. Date: 17 Nov 92 11:48:19 GMT
  1440. Sender: usenet@worldlink.com
  1441. Nntp-Posting-Host: 127.0.0.1
  1442. X-Mailer: PSILink (3.2)
  1443. To:       unix-wizards@sem.brl.mil
  1444.  
  1445. Dear Friends,
  1446.  
  1447. I am having real difficulty with giving access to a variety of users
  1448. segemented into different groups to a number of partitions.
  1449.  
  1450. The general outline is:
  1451.  
  1452. SUN IPX running NFS/NIS and acting as server for PC/NFS
  1453. Users are having problems regardless of method of access
  1454. (PCNFS, telnet, direct), so PCNFS appears not to be relevant.
  1455.  
  1456. Partitioned into several areas for different groups
  1457. Partitions are:  /   /home  /usr    /struc   /trans    etc....
  1458. Some users (groups) need multi-partition access
  1459.  
  1460. Adding some users to secondary groups using the groups database works
  1461. Adding others to the groups database doesn't work
  1462. No particular pattern is apparent
  1463. We are getting desparate.
  1464.  
  1465. Can you please help out if you have run into this before?
  1466.  
  1467. A message from another system administrator follows:
  1468.  
  1469.  --------------------
  1470. Andrew:
  1471.  
  1472. I am totally stopped on this problem.  Everything IS right ( to my
  1473. knowledge). We may have to go to the 'net for help (since we don't
  1474. have a mainteance contract ;-) ). The particulars are:
  1475.  
  1476. Extract of passwd file:
  1477.  
  1478. mgaines:<removed>:2005:1001:Mark Gaines:/home/gru5/mgaines:/bin/csh
  1479. jwhisner:<removed>:2012:1001:Jim Whisner:/home/gru5/jwhisner:/bin/csh
  1480.  
  1481. Extract of group file:
  1482.  
  1483. tranengr:*:1001:transmgr
  1484. trangrap:*:1002:pnaranjo,wegan,ksaunder,mgaines,ebennett,jwhisner,transmgr,rlewis,jprather,jsmith,fstrmbrg,awebster,kwalsh
  1485. structur:*:1003:transmgr
  1486.  
  1487. Output from "groups" commands:
  1488.  
  1489. mgaines : trangrap tranengr
  1490. jwhisner : trangrap tranengr
  1491.  
  1492. Directory Access Listing:
  1493. drwxrws--- 32 transmgr trangrap      1024  Oct 29 09:11  /trans
  1494.  
  1495. Access Allowed for:
  1496. pnaranjo wegan ksaunder ebennett jwhisner transmgr kwalsh
  1497.  
  1498. Access Denied for:
  1499. mgaines rlewis jprather jsmith fstrmbrg awebster
  1500.  
  1501. I have NO CLUE !!!
  1502.  -------------------------
  1503.  
  1504. That's it.   Email or posts to this news group would be appreciated!
  1505.  
  1506. TIA  :)
  1507.  
  1508. -----------------------------
  1509.  
  1510. From: Paul Greenspan <paul@tivoli.uucp>
  1511. Subject: Re: TLI and non-blocking I/O
  1512. Date: 17 Nov 92 14:07:50 GMT
  1513. Followup-To: comp.protocols.tcp-ip
  1514. To:       unix-wizards@sem.brl.mil
  1515.  
  1516. I just wanted to thank all of the people that helped with our problem
  1517. with non-blocking I/O, TLI and SVR4.
  1518.  
  1519. The problem has been determined to be a bug in SVR4 that shows up
  1520. when the same process uses both TCP and UDP and uses non-blocking
  1521. endpoints. 
  1522.  
  1523. Paul
  1524. -- 
  1525. Paul Greenspan              paul@tivoli.com 
  1526. Tivoli Systems              6034 West Courtyard, Suite 210
  1527. Austin, Texas  78730        (512) 794-9070  /  FAX (512) 794-0623
  1528.  
  1529. -----------------------------
  1530.  
  1531. From: Brian Fitzgerald <fitzgb@mml0.meche.rpi.edu>
  1532. Subject: Re: Thanks,
  1533. Date: 17 Nov 92 16:14:11 GMT
  1534. Followup-To: poster
  1535. Nntp-Posting-Host: mml0.meche.rpi.edu
  1536. To:       unix-wizards@sem.brl.mil
  1537.  
  1538. Domenico De Vitto writes:
  1539. >need not prove it to you lot!
  1540. >
  1541. >I did think that this group (that I've been reading for 2 years) had settled
  1542. >down and didn't have any 'children' actively reading it, I was wrong (sadly).
  1543.  
  1544. That's a shame.
  1545.  
  1546. Fellow readers, please, no abusive posting or email, ok?
  1547.  
  1548. RTFNettiquette :-)
  1549.  
  1550. Thanks,
  1551.  
  1552. Brian
  1553.  
  1554. Followup to email or to comp.unix.wizards
  1555.  
  1556. -----------------------------
  1557.  
  1558. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  1559. Subject: Re: Thanks,
  1560. Date: 18 Nov 92 10:56:10 GMT
  1561. To:       unix-wizards@sem.brl.mil
  1562.  
  1563. In article <1992Nov16.085727.762@unix.brighton.ac.uk>, ddv@unix.brighton.ac.uk (Domenico De Vitto) writes:
  1564.  
  1565. > Thanks to all who explained to me what RTFRFC means, most were highly
  1566. > abusive and couldn,t F*CKING well see that I'm not 'on' the internet,
  1567. > from my address,
  1568.  
  1569. I certainly can't.  ddv@unix.brighton.ac.uk doesn't tell me whether
  1570. you're on the Internet or not.  unix.brighton.ac.uk does not seem to
  1571. have an A record, which may or may not mean anything, and most
  1572. certainly doesn't mean that *you* don't have Internet access.
  1573.  
  1574.                     der Mouse
  1575.  
  1576.                 mouse@larry.mcrcim.mcgill.edu
  1577.  
  1578. -----------------------------
  1579.  
  1580. From: Tod McQuillin <tm8t+@andrew.cmu.edu>
  1581. Subject: Re: Changing the owner of a process
  1582. Date: 17 Nov 92 18:41:11 GMT
  1583. Followup-To: comp.unix.internals
  1584. To:       unix-wizards@sem.brl.mil
  1585.  
  1586. eposnak@dale.ksc.nasa.gov (Ed Posnak) writes:
  1587. > What I was looking for was something along the lines of how to change the 
  1588. > effective user id of a process who's source I may not be able to modify, by 
  1589. > some other means, e.g. from another process.  Many suggested writing a device
  1590. > driver or system call to do this.  Here is one answer along those lines. 
  1591. > ---
  1592. > I believe it could be done by writing a device driver. Open the device
  1593. > driver and write commands to it, and it does the dirty work. For
  1594. > instance, send it 8 bytes containing the process to change and the uid
  1595. > to change it to.
  1596. > The uid, in every version of Unix I've seen, is stored in the proc
  1597. > structure in the kernel. You should be able to fiddle with this at
  1598. > will in a device driver, and since it's in the proc structure and not
  1599. > the u area, it'll always be there even if the process is swapped out.
  1600. > It *should* be just a matter of searching for the entry and changing
  1601. > it.
  1602.  
  1603. Yeah, but you don't need a device driver to do that.  Just use
  1604. /dev/kmem, /vmunix, and nlist(3).
  1605.  
  1606. At least for 4.3bsd.
  1607.  
  1608. -----------------------------
  1609.  
  1610. From: "E. Tye McQueen" <tye@spillman.uucp>
  1611. Subject: Programs to create and apply binary patches?
  1612. Date: 17 Nov 92 19:48:26 GMT
  1613. Followup-To: comp.unix.misc
  1614. To:       unix-wizards@sem.brl.mil
  1615.  
  1616. [Follow-ups to comp.unix.misc]
  1617.  
  1618. Any great ideas on how to create a "patch" file of differences between
  1619. two versions of a very large *binary* file (executable) so the patch
  1620. file could be distributed (via modem) and applied to the many copies
  1621. of the old version of the file?
  1622.  
  1623. What I thinking of are two programs:
  1624.     A good differences program that is not line-oriented.
  1625.     A good batch editor that is not line-oriented.
  1626.  
  1627. Several of us here have seen such beasts before but none of us can
  1628. find a nice Unix solution.  Any help would be greatly appreciated.
  1629.  
  1630. I'm considering converting the binary file to be "line-oriented".  But
  1631. it is tricky to put the line breaks so that insertions and deletions of
  1632. code do not cause the difference engine to decide the entire remainder
  1633. of the files are different.
  1634.  
  1635. One scheme is to select a byte value that appears with some fairly
  1636. reqular frequency in the executable and transpose that value and
  1637. newline.  The hard part is finding an apporpriate value (if one even
  1638. exists).
  1639.  
  1640. But I suspect that there is Unix-capatible source code for non-line-
  1641. oriented differences and batch editing programs if I just knew where
  1642. to look.  I tried "archie" but that works best if you already know
  1643. the name of what you are looking for.  Checking for things containing
  1644. "dif" or "patch" doesn't seem to find anything but differences and
  1645. patches of other packages.
  1646.  
  1647. Thanks,
  1648.  tye@spillman.com                         Tye McQueen, E.
  1649.  ----------------------------------------------------------
  1650.  Nothing is obvious unless you are overlooking something. 
  1651.  ----------------------------------------------------------
  1652.  
  1653. -----------------------------
  1654.  
  1655. From: "Suresh .S" <sivap-s@acsu.buffalo.edu>
  1656. Subject: Re: Solaris 2.0/2.1 Realtime programming
  1657. Date: 18 Nov 92 19:18:23 GMT
  1658. Sender: nntp@acsu.buffalo.edu
  1659. Nntp-Posting-Host: thuban.cs.buffalo.edu
  1660. X-Newsreader: TIN [version 1.1 PL6]
  1661. To:       unix-wizards@sem.brl.mil
  1662.  
  1663. Sinan Karasu (sinan@bcsaic.boeing.com) wrote:
  1664. : Hi wizards,
  1665. : I am porting an application that requires very fine
  1666. : timing control to Solaris 2.0/2.1. I need to be able to schedule
  1667. : my program at given time increments. The time increment can be
  1668. : anywhere from 1 millisecond to 50 milliseconds. I gave played
  1669. : with setitimer and SIGALRM , they do work fine except I can not
  1670. : get better than 10 millisecond granularity. So I decided
  1671. : to try something more hardware oriented and noticed that there are
  1672. : 2 timer/counters in the MMU chip.
  1673. : Questions:
  1674.  
  1675.  
  1676. One indirect way of timing with a fine control  is using select() call
  1677. with NULL descriptors set and appropriately setting the struct timeval.
  1678.  
  1679.  
  1680. By setting the struct timeval buf you can  get timings of the order of
  1681. microseconds !!.
  1682.  
  1683. -- 
  1684. Suresh Sivaprakasam                    
  1685. Department of Computer Science,    SUNY Buffalo,    Amherst,   NY - 14260-0001
  1686. Internet :sivap-s@cs.Buffalo.EDU               Bitnet : sivap-s@SUNYBCS.BITNET
  1687.  
  1688. -----------------------------
  1689.  
  1690. From: "Suresh .S" <sivap-s@acsu.buffalo.edu>
  1691. Subject: Re: system call write
  1692. Date: 18 Nov 92 19:34:01 GMT
  1693. Sender: nntp@acsu.buffalo.edu
  1694. Nntp-Posting-Host: thuban.cs.buffalo.edu
  1695. X-Newsreader: TIN [version 1.1 PL6]
  1696. To:       unix-wizards@sem.brl.mil
  1697.  
  1698. P S Narayan (pnarayan@cs.tamu.edu) wrote:
  1699. : When I do a write (fd, buf, bytes), assuming that the file descriptor refers
  1700. : to an open block device say disk, is the kernel going to copy buf from user
  1701. : space to system buffer or is it going to flush it immediately onto disk ?
  1702. : System V literature says that it is copied onto buffer and then by LRU 
  1703. : algorithm, it gets flushed when another process tries to access this buffer.
  1704. : In that case how can the user process without closing the files, ensure that
  1705. : his write system call flushes info onto disk ? Is there a way to do it ?
  1706. : My question is how can I get synchronous write ?
  1707.  
  1708. When you are opening the file, you can  set  the  O_SYNC option in the
  1709. flags, which will give you synchronous writes. Another way could be to
  1710. set the descriptor flags using fcntl()[cmd is F_SETFL].
  1711.  
  1712. I am not sure if that  is available in  others OS, it  is available in
  1713. SunOS4.1.1.
  1714.  
  1715. -- 
  1716. Suresh Sivaprakasam                    
  1717. Department of Computer Science,    SUNY Buffalo,    Amherst,   NY - 14260-0001
  1718. Internet :sivap-s@cs.Buffalo.EDU               Bitnet : sivap-s@SUNYBCS.BITNET
  1719.  
  1720. -----------------------------
  1721.  
  1722.  
  1723. End of UNIX-WIZARDS Digest
  1724. **************************
  1725.  
  1726.