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

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!lhc!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: <34234@adm.brl.mil>
  6. Date: 23 Nov 92 22:16:11 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 1370
  9.  
  10.  
  11.  ----Mail status follows----
  12. Have been unable to send your mail to <DGRAY@STARLAB.CSC.COM>,
  13. will keep trying for a total of eight days.
  14. At that time your mail will be returned.
  15.  
  16.  ----Transcript of message follows----
  17. Date: 22 Nov 92 09:14:00 EST
  18. From: UNIX-WIZARDS@BRL.MIL
  19. Subject: UNIX-WIZARDS Digest  V17#003
  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 09:13:18 EST
  25. Received: from SEM.BRL.MIL by SEM.BRL.MIL id aa25954; 21 Nov 92 8:03 EST
  26. Received: from sem.brl.mil by SEM.BRL.MIL id aa25810; 21 Nov 92 7:40 EST
  27. Date:       Sat, 21 Nov 92 07:40:22 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#003
  32. Message-ID:  <9211210740.aa25810@SEM.BRL.MIL>
  33.  
  34. UNIX-WIZARDS Digest          Sat, 21 Nov 1992              V17#003
  35.  
  36. Today's Topics:
  37.                        Re: The Problem with UNIX
  38.                  Help!  Need to restore without backup
  39.                Re: Help!  Need to restore without backup
  40.                        /bin/ps (SysVr2 -> SysVr3)
  41.                               asm. in UNIX
  42.        Re: >>TAR file on tape distroyed, are files recoverable?<<
  43.                           fflush() on a socket
  44.                         Re: fflush() on a socket
  45. Intro to comp.unix.wizards - read before posting! (weekly announcement, last change: Oct 29 00:48)
  46.                                 amnesiac
  47.                               Re: amnesiac
  48.                          Re: system call write
  49.                                 Thanks,
  50.  
  51. -----------------------------------------------------------------
  52.  
  53. From: Ben Ketteridge <btk@aber.ac.uk>
  54. Subject: Re: The Problem with UNIX
  55. Date: 13 Nov 92 09:43:36 GMT
  56. Sender: Benjamin Thomas Ketteridge <btk@aber.ac.uk>
  57. Nntp-Posting-Host: aberda
  58. To:       unix-wizards@sem.brl.mil
  59.  
  60. From what you say about each of Bryan So cases of command-line problems, I take
  61. it to mean that you think that it is _entirely_ the users' responsibility to
  62. check that they don't type incorrect commands?
  63. For example, just to take the 'cat a b > b' problem, you are suggesting IMHO that
  64. the shell shouldn't check redirection of output against the input and warn the
  65. user in this case.
  66.  
  67. ciao
  68. +--------------------------------------------------------------------------+
  69. |    _|--|_    | Disclaimer: I know nothing! Do you really know anything?  |
  70. |     (\/)     +-------------------------------+---------------------------+
  71. |      vv      | We've a Gremlin in the works! |      btk@aber.ac.uk       |
  72. +--------------+-------------------------------+---------------------------+
  73.  
  74. -----------------------------
  75.  
  76. From: "david.e.wexelblat" <dwex@cbnewsj.cb.att.com>
  77. Subject: Re: The Problem with UNIX
  78. Date: 13 Nov 92 17:48:47 GMT
  79. To:       unix-wizards@sem.brl.mil
  80.  
  81. In article <1992Nov12.231845.14014@cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes:
  82. > Concerning "cat a b > b", barnett@crdgw1.ge.com writes:
  83. >  
  84. > >It has been solved. There are at least two solutions:
  85. > >    1) Educate the user. After all the system did exactly what
  86. > >        the user told it to do.
  87. > >    2) in csh/tcsh, do "set noclobber"
  88. > >
  89. > >grymoire% set noclobber
  90. > >grymoire% touch a b
  91. > >grymoire% cat a b >b
  92. > >b: File exists.
  93. > >--
  94. > >Bruce Barnett <barnett@crd.ge.com> uunet!crdgw1!barnett
  95. > No, the above are not solutions.  
  96. > 1. We should assume some stubborn users cannot be educated.  I
  97. >    claim without proof such users exist.
  98. > 2. set noclobber is not a solution because a solution should
  99. >    prepend a to b.  
  100. > I propose a real solution to this problem.  Change the internal
  101. > policy of UNIX, so that when any file is used as both input and
  102. > output, like
  103. >     cat a b > a
  104. > or     cat a b > b
  105. > UNIX should read and buffer all input before opening the output
  106. > with "w".
  107. > Bryan
  108.  
  109. Get real.  In your example, replace /bin/cat with /bin/echo:
  110.  
  111.     /bin/echo a b > b
  112.  
  113. What should "unix" do here?  You are confusing the OS, the shell, and
  114. the program.  The various responsibilities are distributed.  Cripe - 
  115. MS-DOG has redirection, and will do the same screwup for commands that
  116. are not built into COMMAND.COM.  I doubt that JCL protects you either.
  117.  
  118. Or would you rather have no I/O redirection, and force all the programs
  119. to do all the I/O themselves?  How would you handle pipelines?
  120.  
  121. As soon as you try to protect users from themselves, you destroy
  122. the usefulness of the system.  Who ever said that Unix is supposed to
  123. be the "One True OS" (other than USL :->)?  Don't destroy the usefulness
  124. of my OS because people who shouldn't be using it are involved.
  125.  
  126. --
  127. David Wexelblat <dwex@mtgzfs3.att.com>  (908) 957-5871
  128. AT&T Bell Laboratories, 200 Laurel Ave - 4B-421, Middletown, NJ  07748
  129.  
  130. "The meaning of life?  That's simple.  Try to be happy, try not to hurt
  131.  other people, and hope to fall in love."  -- Mallory Keaton
  132.  
  133. -----------------------------
  134.  
  135. From: Donn Cave <donn@carson.u.washington.edu>
  136. Subject: Re: The Problem with UNIX
  137. Date: 13 Nov 92 18:01:32 GMT
  138. Sender: USENET News System <news@u.washington.edu>
  139. To:       unix-wizards@sem.brl.mil
  140.  
  141. evansmp@uhura.aston.ac.uk (Mark Evans) writes:
  142.  
  143. |michael@chpc.utexas.edu (Michael Lemke) writes:
  144.  ...
  145. |: Well, fixing typos is neat but it is not the essential problem.  My
  146. |: main complaint about Unix on the user interface level is that there is
  147. |: no command line interpreter.  What I mean is that after the shell munged
  148. |: your command line it is *completely* up to the program to interpret the
  149. |: command line and there is no system function available to parse even
  150. |: these `standard' options. ...
  151.  
  152. | Could you say what operating system has this feature.
  153. | (DOS dos the same, what does VMS do?)
  154. | Also how the programmer is ment to use it.
  155. | Does this belong in the operating system (thus resulting in command line
  156. | options sitting in the PCB, yuck!! add a new 'standard' option rebuild 
  157. | the system)
  158.  
  159. VMS does in fact have a command interpreter, DCL.  From a programmer's point
  160. of view, it's a callable system interface that yields up the parsed command
  161. line.  From the user's point of view, it's a fairly regular command language
  162. with consistent rules about abbreviations and optional parameters.
  163. Unfortunately, it's pretty weak as a programming language, but it does have
  164. "lexical functions" built in to do things like parse file names and wildcards,
  165. get system information of various kinds and do some text manipulation.
  166.  
  167. I'm not strong on VMS internals, but I don't think the command line goes
  168. into a PCB, but rather is stored in a DCL supervisor area per user - VMS
  169. may be a little more complex than UNIX in this respect.  There's a command
  170. history, which presumably is also stored there.  Changing the command set
  171. does not require rebuilding the system, and users may adopt their own
  172. command tables or add their own customizations.  Updating the command table
  173. can be problem, since the change doesn't affect current jobs, but that's
  174. an implementation issue.
  175.  
  176. Probably the biggest issue for the programmer is that DCL doesn't expand
  177. wild cards.  VMS applications expand wild cards using file system services,
  178. which is much harder programming work but gives you a lot more control over
  179. the semantics of the operation, as opposed to (int argc, const char **argv).
  180. For example, one may use the file specification in one parameter to supply
  181. defaults for the specification in another parameter, further controlling
  182. whether the defaults are to be applied using output (new) file or input
  183. (old) file semantics.  That makes "RENAME *.C .C-DIST" a natural idiom in
  184. VMS, where in UNIX the same operation ("how do I rename a group of files")
  185. regularly generates questions on this news group.  It does however mean
  186. that applications accept wild cards only if the programmer invested the
  187. time.
  188.  
  189.     Donn Cave, University Computing Services, University of Washington
  190.     donn@cac.washington.edu
  191.  
  192. -----------------------------
  193.  
  194. From: Boyd Roberts <boyd@prl.dec.com>
  195. Subject: Re: The Problem with UNIX
  196. Date: 13 Nov 92 18:08:04 GMT
  197. Sender: USENET News System <news@prl.dec.com>
  198. Nntp-Posting-Host: prl313.prl.dec.com
  199. To:       unix-wizards@sem.brl.mil
  200.  
  201. In article <1992Nov13.030529.6207@bilver.uucp>, bill@bilver.uucp (Bill Vermillion) writes:
  202. > And some of the lastest bourne shells also have fixed it.  In sysv.3.2
  203. > from Esix if I type
  204. > cat a b > b    I get this result
  205. > cat: input/output files 'b' identical
  206.  
  207. It has nothing to do with the shell;  read the message.
  208.  
  209. cat has done that for a long time.
  210.  
  211.  
  212. Boyd Roberts            boyd@prl.dec.com
  213.  
  214. ``Not only is UNIX dead, it's starting to smell really bad.''  -- Rob Pike
  215.  
  216. -----------------------------
  217.  
  218. From: Eric Eide <eeide%asylum.cs.utah.edu@cs.utah.edu>
  219. Subject: Re: The Problem with UNIX
  220. Date: 13 Nov 92 19:32:14 GMT
  221. To:       unix-wizards@sem.brl.mil
  222.  
  223. I wrote:
  224.  
  225. Eric> I know of somebody who is doing research in this direction: me.  As part
  226. Eric> of my Masters degree I am modifying the C shell to be more tolerant of
  227. Eric> errors, both errors in syntax (e.g., typos) and semantics (e.g.,
  228. Eric> inappropriate command line arguments).  My new shell keeps track of the
  229. Eric> user's command history in order to make accurate corrections.
  230.  
  231. And Jurgen Botz (jbotz@mtholyoke.edu) wrote:
  232.  
  233. Jurgen> Without wanting to make a judgement about the viability of the basic
  234. Jurgen> research underlying such a project, why are you starting with the C
  235. Jurgen> shell?  If I wanted to create a user-interface that could deal with
  236. Jurgen> errors and ambiguities introduced by the user I would first make sure
  237. Jurgen> that the software itself isn't full of errors and ambiguities... i.e.,
  238. Jurgen> I sure as hell wouldn't use the C shell.
  239.  
  240. Good point.  The reason that I chose the C shell is that within the Univeristy
  241. of Utah's Department of CS, it is the most commonly interactively-used program
  242. with a command-line interface.  This makes it easy to find lab rats... er,
  243. guinea pigs... um, volunteers to test my improved interface.  And since the C
  244. shell is so commonly used, it seemed that improvements to the C shell would be
  245. most valuable.  That is, a "smart shell" would be more valuable than a "smart
  246. ftp."
  247.  
  248. In many ways the C shell is a bad candidate for smarts.  Most of the shell's
  249. "command set" is implemented by programs that have no real connection to the
  250. shell.  This "command set" is inconsistent (e.g., different programs accept
  251. different argument syntax).  And the shell itself has bugs and ambiguities.
  252. But on the other hand, of all the programs available in UNIX, the C shell is
  253. arguably the program in which intelligence would be most useful.
  254.  
  255. So I made my choice based on the potential value of the improvements.
  256.  
  257. --
  258.  -------------------------------------------------------------------------------
  259. Eric Eide          |          University of Utah Department of Computer Science
  260. eeide@cs.utah.edu  | Buddhist to hot dog vendor: "Make me one with everything."
  261.  
  262. -----------------------------
  263.  
  264. From: Anthony P Lawrence <apl@world.std.com>
  265. Subject: Re: The Problem with UNIX
  266. Date: 13 Nov 92 19:43:34 GMT
  267. X-Newsreader: Tin 1.1 PL3
  268. To:       unix-wizards@sem.brl.mil
  269.  
  270. mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  271. : No, you misunderstand.  Not "why bother using a computer anyway" but
  272. : "why use a system which wasn't designed for you and isn't suited to
  273. : you".  UNIX was built by hackers for hackers, and hackers seem to like
  274. : it just fine.  If you don't like it, by all means, don't use it.
  275.  
  276. True, but: shouldn't we have an interest in keeping Unix alive in
  277. the general use arena?  If SuperDos VIII completely takes over,
  278. aren't we left in the same position as those wonderfully strange
  279. folks who still run CP/M ?
  280.  
  281. Personally, I don't want a shell that thinks very much about what
  282. I might have meant.  But I think it would be real nice if there
  283. were such a sissified but friendly little helper around that I
  284. could use for the people who hate anything I can give them now.
  285.  
  286.         Tony   apl@world.std.com
  287.  
  288. Lawrence & Clark, Inc        (617) 762-0707    (206) 323-2864
  289. Xenix/Unix support,etc           Boston         Seattle
  290.  
  291. -----------------------------
  292.  
  293. From: Michael Lemke <michael@chpc.utexas.edu>
  294. Subject: Re: The Problem with UNIX
  295. Date: 13 Nov 92 21:31:07 GMT
  296. To:       unix-wizards@sem.brl.mil
  297.  
  298. In article <1992Nov13.094336.2341@aber.ac.uk> btk@aber.ac.uk (Ben Ketteridge) writes:
  299. >From what you say about each of Bryan So cases of command-line problems, I take
  300. >it to mean that you think that it is _entirely_ the users' responsibility to
  301. >check that they don't type incorrect commands?
  302. >For example, just to take the 'cat a b > b' problem, you are suggesting IMHO 
  303. >that
  304. >the shell shouldn't check redirection of output against the input and warn the
  305. >user in this case.
  306.  
  307. Actually, I think this example should work!  It is a perfectly 
  308. reasonable request.  
  309.  
  310. -- 
  311. Michael Lemke
  312. Astronomy, UT Austin, Texas
  313. (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
  314.  
  315. -----------------------------
  316.  
  317. From: Michael Lemke <michael@chpc.utexas.edu>
  318. Subject: Re: The Problem with UNIX
  319. Date: 13 Nov 92 22:32:42 GMT
  320. To:       unix-wizards@sem.brl.mil
  321.  
  322. In article <1992Nov13.180132.141@u.washington.edu> donn@carson.u.washington.edu (Donn Cave) writes:
  323. >evansmp@uhura.aston.ac.uk (Mark Evans) writes:
  324. >
  325. >|michael@chpc.utexas.edu (Michael Lemke) writes:
  326. >...
  327. >|: Well, fixing typos is neat but it is not the essential problem.  My
  328. >|: main complaint about Unix on the user interface level is that there is
  329. >|: no command line interpreter.  What I mean is that after the shell munged
  330. >|: your command line it is *completely* up to the program to interpret the
  331. >|: command line and there is no system function available to parse even
  332. >|: these `standard' options. ...
  333. >
  334. >| Could you say what operating system has this feature.
  335. >| (DOS dos the same, what does VMS do?)
  336. >| Also how the programmer is ment to use it.
  337. >| Does this belong in the operating system (thus resulting in command line
  338. >| options sitting in the PCB, yuck!! add a new 'standard' option rebuild 
  339. >| the system)
  340. >
  341. >VMS does in fact have a command interpreter, DCL.  
  342.  
  343. When I wrote my little remark up there I actually had VMS in mind.  
  344. Several people pointed out in the meantime that there is getopt (3), of 
  345. which I wasn't aware at the time of writing.  Well, that is a least a 
  346. start but as some people also remarked it is somewhat limited and
  347. overkill in other cases.  Does it allow optional parameters (I know 
  348. getopts in the Bourne shell does not)?
  349.  
  350. >From a programmer's point
  351. >of view, it's a callable system interface that yields up the parsed command
  352. >line.  From the user's point of view, it's a fairly regular command language
  353. >with consistent rules about abbreviations and optional parameters.
  354. >Unfortunately, it's pretty weak as a programming language, 
  355.  
  356. True, but we weren't talking about programming although that is a very 
  357. important aspect too.
  358.  
  359. >but it does have
  360. >"lexical functions" built in to do things like parse file names and wildcards,
  361. >get system information of various kinds and do some text manipulation.
  362.  
  363. Although definately not as flexible as Unix it is consistent on every level,
  364. i.e., if you parse a filename with f$parse/f$scan from DCL or call 
  365. lib$find_file from a program the behavior is identical.  And concerning 
  366. command line parsing the CLI$ routines are easily callable from any 
  367. language and can even be used for the internal command driven interface 
  368. of your application program.  Their use is a little complex but command 
  369. line parsing is a complex problem -- lex isn't easy to use either (I 
  370. can't).
  371.  
  372. >
  373. >I'm not strong on VMS internals, but I don't think the command line goes
  374. >into a PCB, but rather is stored in a DCL supervisor area per user - VMS
  375. >may be a little more complex than UNIX in this respect.  There's a command
  376. >history, which presumably is also stored there.  Changing the command set
  377. >does not require rebuilding the system, and users may adopt their own
  378. >command tables or add their own customizations.  Updating the command table
  379. >can be problem, since the change doesn't affect current jobs, but that's
  380. >an implementation issue.
  381. >
  382. >Probably the biggest issue for the programmer is that DCL doesn't expand
  383. >wild cards.  VMS applications expand wild cards using file system services,
  384. >which is much harder programming work but gives you a lot more control over
  385. >the semantics of the operation, as opposed to (int argc, const char **argv).
  386.  
  387. Well, it is really not that hard to do.  Just call lib$find_file in a
  388. loop until it returns RMS$_NMF.  You'll need the loop anyway.
  389.  
  390. >For example, one may use the file specification in one parameter to supply
  391. >defaults for the specification in another parameter, further controlling
  392. >whether the defaults are to be applied using output (new) file or input
  393. >(old) file semantics.  That makes "RENAME *.C .C-DIST" a natural idiom in
  394. >VMS, where in UNIX the same operation ("how do I rename a group of files")
  395. >regularly generates questions on this news group.  It does however mean
  396. >that applications accept wild cards only if the programmer invested the
  397. >time.
  398.  
  399. That is certainly true.  But I am very much convinced that none of the 
  400. typical Unix users understand that the shell is expanding the wildcards
  401. and they will be rather very surprised to see echo * produce a strange 
  402. ls listing.  On the other hand not many people completely understand the
  403. sticky defaults you just described either.
  404.  
  405. -- 
  406. Michael Lemke
  407. Astronomy, UT Austin, Texas
  408. (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
  409.  
  410. -----------------------------
  411.  
  412. From: Michael Lemke <michael@chpc.utexas.edu>
  413. Subject: Re: The Problem with UNIX
  414. Date: 13 Nov 92 22:47:18 GMT
  415. To:       unix-wizards@sem.brl.mil
  416.  
  417. In article <BARNETT.92Nov13093417@grymoire.crd.ge.com> barnett@crdgw1.ge.com writes:
  418. >In article <1992Nov12.193707.27532@chpc.utexas.edu> michael@chpc.utexas.edu (Michael Lemke) writes:
  419. >>   Well, fixing typos is neat but it is not the essential problem.  My
  420. >>   main complaint about Unix on the user interface level is that there is
  421. >>   no command line interpreter.  What I mean is that after the shell munged
  422. >>   your command line it is *completely* up to the program to interpret the
  423. >>   command line and there is no system function available to parse even
  424. >>   these `standard' options. 
  425. >
  426. >Some look at this as an advantage. You are probably complaining about
  427. >the inability to perform
  428. >    rename *.old *.new
  429. >
  430.  
  431. No, I don't.  I am complaining that the options are a) parsed
  432. inconsistently (`bla -lx a' might be valid and `bla -l x a' not but
  433. `foo -l x a ' is ok and `foo -lx a' is not) and b) that -l means long
  434. for ls -l but library for f77 -l.  I want ls -long and f77 -library and
  435. be able to abbreviate both -long and -library because `long' and
  436. `library' is what I mean and not -l.
  437.  
  438. I am not addressing the question of parameter substitution and I/O 
  439. redirection at all as you do in the rest of your post.  That would open 
  440. a whole new can of worms.
  441.  
  442. [worms eaten by the fish]
  443.  
  444. >
  445. >
  446. >It sounds like most of your problem is due to the large number of UNIX
  447. >utilities. How many does DOS have? 
  448.  
  449. No idea.  I don't know DOS.
  450.  
  451. -- 
  452. Michael Lemke
  453. Astronomy, UT Austin, Texas
  454. (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
  455.  
  456. -----------------------------
  457.  
  458. From: Robert Hartman <hartman@informix.com>
  459. Subject: Re: The Problem with UNIX
  460. Date: 13 Nov 92 23:29:27 GMT
  461. Sender: Usenet News <news@informix.com>
  462. To:       unix-wizards@sem.brl.mil
  463.  
  464. In article <1992Nov13.104731.29328@aston.ac.uk> evansmp@uhura.aston.ac.uk (Mark Evans) writes:
  465. >michael@chpc.utexas.edu (Michael Lemke) writes:
  466.  ...
  467. >: > ... My new shell keeps track of the user's command history in order to
  468. >: >make accurate corrections.
  469. >: >
  470. >: >I have no hopes to solve all of the shell user interface problems, but I do
  471. >: >hope to solve most of the common errors.  Just by fixing obvious typos my shell
  472. >: >can fix 90% of the command line errors that I (and most people) make on a daily
  473. >: >basis.
  474. >: >
  475. >: 
  476. >: Well, fixing typos is neat but it is not the essential problem.  My
  477. >: main complaint about Unix on the user interface level is that there is
  478. >: no command line interpreter.
  479.  
  480. [discussion of no standard options problem omitted for brevity]
  481.  
  482. >:  ... This would all be
  483. >: solved if there were *one* system function that is used by all programs
  484. >: instead of having every program duplicate more or less the same
  485. >: functionality with different success.  And it would be great if you
  486. >: could abbreviate commands (command completion of some shells it neat
  487. >: but why is it neccessary in the first place?) and options (no need for
  488. >: dynamic chinese anymore).
  489.  
  490. You know, I see merit in both of these approaches.  The command line
  491. parser should be a library routine in stdio.  The shell should use
  492. command and option completion prior to exec, and the command history to
  493. autocorrect typos when the parsing routine returns an error.  This
  494. routine could perhaps be called by the shell as the last step prior to
  495. calling exec to save system overhead of having to create a process
  496. only to return an immediate error.
  497.  
  498. -r
  499.  
  500. -----------------------------
  501.  
  502. From: "Paul O. Hart" <phart@heineken.tuc.nrao.edu>
  503. Subject: Re: The Problem with UNIX
  504. Date: 14 Nov 92 02:00:19 GMT
  505. Sender: news@nrao.edu
  506. To:       unix-wizards@sem.brl.mil
  507.  
  508. Quoted from apl@world.std.com (Anthony P Lawrence) in <Bxo6sn.FtC@world.std.com>:
  509. ->Personally, I don't want a shell that thinks very much about what
  510. ->I might have meant.
  511. ->
  512. ->        Tony   apl@world.std.com
  513. ->
  514. ->Lawrence & Clark, Inc        (617) 762-0707    (206) 323-2864
  515. ->Xenix/Unix support,etc           Boston         Seattle
  516.  
  517. This IS the point.  UNIX has always been a collection of tools
  518. which the user can put together in any way he/she deems fit.  If
  519. the user would RTFM there would be no problem and they would get
  520. what they want.  Don't like the way a shell does something ?  Do
  521. something about it by writing a program or making a script.  Stop
  522. whining !
  523.  
  524.  
  525.  
  526.  
  527. -- 
  528.  
  529. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  530. | Eternal  nothingness is fine, ||**|| Paul O. Hart,   12m Operations Group |
  531. | if  you happen to  be dressed ||**|| National Radio Astronomy Observatory |
  532. | for it.           Woody Allen ||**|| Tucson, Arizona   {>  {>  {>  {>  {> |
  533. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=^=-=^=-=^=-=^=-=^=-=
  534.  
  535. -----------------------------
  536.  
  537. From: Peter Busser <peter@global.hacktic.nl>
  538. Subject: Re: The Problem with UNIX
  539. Date: 14 Nov 92 14:59:43 GMT
  540. To:       unix-wizards@sem.brl.mil
  541.  
  542. kanderso@reed.edu (Karl Anderson) writes:
  543.  
  544. >Is there any reason why there can't be another stream for more
  545. >user-friendly messages?
  546.  
  547. Yes! Feeping creaturism. I'm pro user friendly messages, but, IMHO, consistency
  548. and clarity are much more important than verboseness. Furthermore, it would
  549. require existing programs to be extended with the verbose message.
  550.  
  551. A better approach would be, IMHO, to leave the messages what they are and make
  552. every program return a meaningful error number. A seperate program could
  553. figure out which verbose message belongs to that number. That saves several K's
  554. of text for each program and makes translation to foreign langauges much
  555. easier. The user who uses such a tool gradually learns to associate the terse
  556. error message to the verbose description. After a while, (s)he wouldn't need
  557. the verbosity tool much anymore. That way the learning curve is less steep and
  558. it doesn't affect the guru type, who ignores that verbosity tool, at all.
  559.  
  560. The attitude that it needs a steep learning curve to be useful is nonsense.
  561.  
  562. BTW, the above mentioned 'verbosity tool' is actually used by OS/2. Although
  563. the difference is that OS/2 prints an error number and you have to type the
  564. error number on the command line to get a meaningful message.
  565.  
  566. BTW^2, OS-9 (which has nothing to do with Plan 9 or OS/2) has a shell built-in
  567. command which sets the verbosity level (the shell takes care of printing the
  568. error messages, as far as I can remember, the command just returns the error
  569. number) to either 'short' or 'long'.
  570.  
  571. -----------------------------
  572.  
  573. From: Peter Busser <peter@global.hacktic.nl>
  574. Subject: Re: The Problem with UNIX
  575. Date: 14 Nov 92 15:13:18 GMT
  576. To:       unix-wizards@sem.brl.mil
  577.  
  578. acourtny@unix1.tcd.ie (Antony A. Courtney) writes:
  579.  
  580. >>So, Boyd, if UNIX really is dead, where is the funeral? I would so enjoy
  581. >>paying my last respects ...
  582.  
  583. >But in the process of adding all of these new "features" to
  584. >UNIX, these new operating systems somehow lost the brevity, clarity, simplicity
  585. >and structural elegance of that other system once called UNIX.
  586.  
  587. That's a good point! For instance, instead of using the creat() system call,
  588. which creates a file with given permissions, they added a parameter open() to
  589. duplicate the functionality of creat().
  590.  
  591. >UNIX is dead.  Long live UNIX.
  592.  
  593. Long live Plan 9?
  594.  
  595. Greetings,
  596. Peter Busser
  597.  
  598. -----------------------------
  599.  
  600. From: Peter Busser <peter@global.hacktic.nl>
  601. Subject: Re: The Problem with UNIX
  602. Date: 14 Nov 92 15:20:13 GMT
  603. To:       unix-wizards@sem.brl.mil
  604.  
  605. arnej@kari.fm.unit.no (Arne Henrik Juul) writes:
  606.  
  607. >I can imagine it will be impossible to make this mistake in
  608. >Windows/NT, but I fully expect that it will be impossible to
  609. >concatenate two files in Windows/NT too.
  610.  
  611. That's nonsense, even DOS can do that:
  612.  
  613.   COPY /B FILE.1+FILE.2+FILE.3 FILE.ALL
  614.  
  615. It's ugly, but it works anyway.
  616.  
  617. -----------------------------
  618.  
  619. From: Peter Busser <peter@global.hacktic.nl>
  620. Subject: Re: The Problem with UNIX
  621. Date: 14 Nov 92 15:22:35 GMT
  622. To:       unix-wizards@sem.brl.mil
  623.  
  624. bill@bilver.uucp (Bill Vermillion) writes:
  625.  
  626. >cat a b > b    I get this result
  627.  
  628. >cat: input/output files 'b' identical
  629.  
  630. GNU bash says:
  631. cat: b: input file is output file
  632.  
  633. -----------------------------
  634.  
  635. From: Peter Busser <peter@global.hacktic.nl>
  636. Subject: Re: The Problem with UNIX
  637. Date: 14 Nov 92 15:38:57 GMT
  638. To:       unix-wizards@sem.brl.mil
  639.  
  640. mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
  641.  
  642. >    cat a b > b
  643.  
  644. >files?  Consider instead "echo a b > b".[%]
  645.  
  646. I did just that with bash and it didn't complain. But yet, echo is often a
  647. built-in command. It complained about 'cat a b >b' but didn't complain about
  648. 'cat a b|cat>b' so it's not perfect.
  649.  
  650. >switched to using dd, which mercifully had not been broken by some
  651. >overzealous fool trying to keep people from shooting themselves in the
  652. >foot.
  653.  
  654. <GRIN>
  655.  
  656. >Yes, it might.  So what?  Is "acceptance in the general microcomputer
  657. >market place" something we wish for UNIX?  If it means dumbing down the
  658. >interface until people no longer have enough rope to hang themselves,
  659. >well, you can if you want, but I'll keep using what I've got.
  660.  
  661. Acceptance in the general microcomputer market also means more software, lower
  662. prices, more support (every (S)VGA card ships with Windows drivers, but X11
  663. support is harder to get), more UNIX related jobs (or do you prefer to use
  664. Windows at work? :), more UNIX everything.
  665.  
  666. -----------------------------
  667.  
  668. From: Leslie Mikesell <les@chinet.chi.il.us>
  669. Subject: Re: The Problem with UNIX
  670. Date: 14 Nov 92 17:59:45 GMT
  671. To:       unix-wizards@sem.brl.mil
  672.  
  673. In article <1992Nov12.221405.7594@mole-end.matawan.nj.us> mat@mole-end.matawan.nj.us writes:
  674.  
  675. >I disagree on this one.  I can't stand the SVr4 mail program's unwillingness
  676. >to display a file in which someone has accidentally put ONE backspace or
  677. >escape.  And of course there are nroff output files with
  678. >  _^hu_^hn_^hd_^he_^hr_^hl_^hi_^hn_^h_^he  in them.
  679.  
  680. I meant the transport does the right thing in delivering the message as
  681. sent.  I didn't think anyone actually used SysV mail's user interface
  682. (or lack thereof).
  683.  
  684. >This user says `Plugh!'
  685.  
  686. Do yourself a favor and compile ELM.
  687.  
  688. >(Really, until we all use some form of BLOB-linked-in-text we'll have this
  689. >argument over and over.)
  690.  
  691. MIME attachments address this and it's likely to catch on fast.  However
  692. while it's nice for the user interface to understand content types it's
  693. not really any more necessary than for cp/cpio/tar to understand what
  694. they are copying.
  695.  
  696. Les Mikesell
  697.   les@chinet.chi.il.us
  698.  
  699. -----------------------------
  700.  
  701. From: Boyd Roberts <boyd@prl.dec.com>
  702. Subject: Re: The Problem with UNIX
  703. Date: 14 Nov 92 21:12:14 GMT
  704. Sender: USENET News System <news@prl.dec.com>
  705. Nntp-Posting-Host: prl313.prl.dec.com
  706. To:       unix-wizards@sem.brl.mil
  707.  
  708. In article <1992Nov13.180132.141@u.washington.edu>, donn@carson.u.washington.edu (Donn Cave) writes:
  709. > VMS does in fact have a command interpreter, DCL.  From a programmer's point
  710. > of view, it's a callable system interface that yields up the parsed command
  711. > line.  From the user's point of view, it's a fairly regular command language
  712. > with consistent rules about abbreviations and optional parameters.
  713.  
  714. Yeah what I love about VMS is that it's regular:
  715.  
  716.     $ show queue eve
  717.     ...
  718.     $ start queue eve
  719.     %DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
  720.  \EVE\
  721.     $ start/queue eve
  722.     %JBC-E-STARTED, queue already started
  723.  
  724.  
  725. Boyd Roberts            boyd@prl.dec.com
  726.  
  727. ``Not only is UNIX dead, it's starting to smell really bad.''  -- Rob Pike
  728.  
  729. -----------------------------
  730.  
  731. From: Steve Bacher <SEB1525@mvs.draper.com>
  732. Subject: Re: The Problem with UNIX
  733. Date: 14 Nov 92 21:24:00 GMT
  734. Sender: MVS NNTP News Reader <NNMVS@mvs.draper.com>
  735. Nntp-Posting-Host: mvs.draper.com
  736. To:       unix-wizards@sem.brl.mil
  737.  
  738. In article <1992Nov13.180132.141@u.washington.edu>,
  739. donn@carson.u.washington.edu (Donn Cave) writes:
  740.  
  741. >evansmp@uhura.aston.ac.uk (Mark Evans) writes:
  742. >
  743. >|michael@chpc.utexas.edu (Michael Lemke) writes:
  744. >...
  745. >|: Well, fixing typos is neat but it is not the essential problem.  My
  746. >|: main complaint about Unix on the user interface level is that there is
  747. >|: no command line interpreter.  What I mean is that after the shell munged
  748. >|: your command line it is *completely* up to the program to interpret the
  749. >|: command line and there is no system function available to parse even
  750. >|: these `standard' options. ...
  751. >
  752. >| Could you say what operating system has this feature.
  753. >| (DOS dos the same, what does VMS do?)
  754. >| Also how the programmer is ment to use it.
  755. >| Does this belong in the operating system (thus resulting in command line
  756. >| options sitting in the PCB, yuck!! add a new 'standard' option rebuild
  757. >| the system)
  758.  
  759. [discussions of getopt(3) and VMS DCL deleted...]
  760.  
  761. MVS TSO (don't barf) has this feature.  TSO commands call a PARSE
  762. service routine that you give a definition of all the command operands,
  763. what sorts of syntactical entities they take (covering a lot of common
  764. formats), where to stick the results, etc.  The operands can be
  765. abbreviated in predictable and standard ways.  Users are automatically
  766. prompted for missing or invalid operands.  The program sees only the
  767. final correct inputs after prompting is completed.
  768.  
  769. The specifications are internal to the program; they do not have to
  770. be defined in some external location by some systems programmer.
  771. And a command processor is free to not call parse at all but just
  772. look at the raw command line if it wants to.
  773.  
  774. Wildcarding is not done by the parse service, but by a catalog lookup
  775. routine callable by the command processor which returns a list of
  776. filenames that match the pattern.  Admittedly, the patterns under
  777. TSO are ridiculously limited and the programming is complicated,
  778. but the theory is sound.
  779.  
  780. Oh, but of course IBM couldn't possibly have done anything right...
  781.  
  782. --
  783. Steve Bacher (Batchman)                 Draper Laboratory
  784. Internet: seb@draper.com                Cambridge, MA, USA
  785.  
  786. -----------------------------
  787.  
  788. From: Leslie Mikesell <les@chinet.chi.il.us>
  789. Subject: Re: The Problem with UNIX
  790. Date: 14 Nov 92 21:40:11 GMT
  791. To:       unix-wizards@sem.brl.mil
  792.  
  793. In article <1992Nov14.020019.23466@nrao.edu> phart@heineken.tuc.nrao.edu (Paul O. Hart) writes:
  794.  
  795. >This IS the point.  UNIX has always been a collection of tools
  796. >which the user can put together in any way he/she deems fit.
  797.  
  798. Yes, and UNIX has always come with an administrator to do it for
  799. you - sometimes even with people with access to the source so they
  800. could really make the changes you want.  Those days are over for
  801. most folks.  Today you are expected to solve your own problems and
  802. people are used to out-of-the box solutions.
  803.  
  804. >If the user would RTFM there would be no problem and they would get
  805. >what they want.  Don't like the way a shell does something ?  Do
  806. >something about it by writing a program or making a script.  Stop
  807. >whining !
  808.  
  809. But it's a mass-market world out there. Why should everyone have to
  810. solve the same programming problems?  You are right that it isn't
  811. a UNIX problem - it's just a lack of a generally accepted friendly
  812. shell.  Just try to apply your arguments to the business world (or
  813. anywhere else where you have to get some real work done instead of
  814. spending your life with the FM).  Would you run a business with the
  815. secretaries saving files by typing > at the shell?  How often do
  816. you think they'll hit arrow keys and get an escape sequence imbedded
  817. in a filename?  How much will it cost you to train them to the point
  818. where they get it right 99% of the time?  How long will it be before
  819. someone types "rm -rf directory *" instead of "rm -rf directory &"?
  820. (That one actually happened when someone who should have known better
  821. was helping me out, but it's just one key away).   These problems
  822. could be solved as easily under unix as anywhere else, except for
  823. the fact that people who have spent years learning unix have forgotten
  824. that there is a problem.
  825.  
  826. Les Mikesell
  827.   les@chinet.chi.il.us
  828.  
  829. -----------------------------
  830.  
  831. From: Marc Unangst <mju@mudos.ann-arbor.mi.us>
  832. Subject: Re: The Problem with UNIX
  833. Date: 15 Nov 92 10:38:49 GMT
  834. To:       unix-wizards@sem.brl.mil
  835.  
  836. In article <1992Nov12.231845.14014@cs.wisc.edu> so@brownie.cs.wisc.edu (Bryan S. So) writes:
  837. >1. We should assume some stubborn users cannot be educated.  I
  838. >   claim without proof such users exist.
  839.  
  840. I will agree with your claim that such users exist; however, a better
  841. question to ask is whether we should bother with stubborn people who
  842. refuse to be educated in the first place.  Unless they are your boss,
  843. there really is no reason to force someone to use an OS that they
  844. obviously don't want to use in the first place; give them their
  845. Macintosh and their user-cuddly interface and let them be happy.  Of
  846. course, they might not get as much done, but that's their problem.
  847.  
  848. >2. set noclobber is not a solution because a solution should
  849. >   prepend a to b.  
  850.  
  851. Assuming, of course, that "prepend a to b" is what the user meant.
  852. It's possible that they meant "concatenate a and b and send the output
  853. to v", and that they simply made a typo.  In which case prepending a
  854. to b would most definitely *not* be what the user wanted, and generate
  855. a lot of extra work for them to boot (specifically, removing a from
  856. the top of b by hand).
  857.  
  858. >I propose a real solution to this problem.  Change the internal
  859. >policy of UNIX, so that when any file is used as both input and
  860. >output, like
  861. >
  862. >    cat a b > a
  863. >or     cat a b > b
  864. >
  865. >UNIX should read and buffer all input before opening the output
  866. >with "w".
  867.  
  868. Uh, right.  How does "Unix" know that b is both input and output?  The
  869. shell doesn't know; all that's happened is that it has been asked to
  870. run a program, "cat", and pass it the two arguments "a" and "b", and
  871. send the output to a file called "b".  The "b" on the command line may
  872. or may not refer to the file called "b", and cat may or may not decide
  873. to read from it.  By the time cat has started up and made things
  874. obvious to the kernel that "a" and "b" are input files, "b" is gone,
  875. because the shell truncated it before it exec'd cat.
  876.  
  877. There are also problems with buffering the input.  What if the "b" is
  878. a FIFO or a device, not a regular file?  In that case, "cat b > b" is
  879. perfectly valid and not at all abnormal.  What if "b" is a Unix-domain
  880. socket, and the program at the other end writes something and then
  881. waits for a response before closing the file?  Your program will never
  882. run, because Unix will be sitting there waiting to read the "rest" of
  883. the input file before giving the program control.
  884.  
  885. Perhaps what we *really* need is a -o flag for cat, similar to the one
  886. on sort.
  887.  
  888. -- 
  889. Marc Unangst, N8VRH         | "There are two ways to solve this problem:
  890. mju@mudos.ann-arbor.mi.us   | the hard way, and the easy way.  Let's start
  891.                             | with the hard way."
  892.                             |   - W. Scheider, from a Physics lecture
  893.  
  894. -----------------------------
  895.  
  896. From: Rich Kulawiec <rsk@gynko.circ.upenn.edu>
  897. Subject: Re: The Problem with UNIX
  898. Date: 15 Nov 92 16:43:20 GMT
  899. Sender: news@netnews.upenn.edu
  900. Followup-To: comp.unix.wizards
  901. Nntp-Posting-Host: gynko.circ.upenn.edu
  902. To:       unix-wizards@sem.brl.mil
  903.  
  904. In article <Bxq6uz.BB8@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes:
  905. >These problems could be solved as easily under unix as anywhere else,
  906. >except for the fact that people who have spent years learning unix
  907. >have forgotten that there is a problem.
  908.  
  909. "Problem" is a matter of opinion; I consider the items you list "features",
  910. and find the occasional toasting that they give to a user who didn't RTFM
  911. a helpful educational tool.  I happen to like the expert-friendly
  912. and relatively unforgiving nature of most Unix implmentations.  Those
  913. who feel otherwise are certainly free to implement whatever warm-fuzzy-
  914. hand-holding-protect-the-user-from-themselves features they wish.
  915.  
  916. ---Rsk
  917.  
  918. -----------------------------
  919.  
  920. From: Marc Unangst <mju@mudos.ann-arbor.mi.us>
  921. Subject: Re: The Problem with UNIX
  922. Date: 15 Nov 92 20:26:23 GMT
  923. To:       unix-wizards@sem.brl.mil
  924.  
  925. In article <1992Nov14.153857.1666@global.hacktic.nl> peter@global.hacktic.nl (Peter Busser) writes:
  926. >I did just that with bash and it didn't complain. But yet, echo is often a
  927. >built-in command. It complained about 'cat a b >b' but didn't complain about
  928. >'cat a b|cat>b' so it's not perfect.
  929.  
  930. You fail to see the point.  It's useless for cat to complain, because
  931. once cat gets to run "b" has already been clobbered by the shell.  Try
  932.  
  933. $ echo foo >foo
  934. $ echo bar >bar
  935. $ cat foo
  936. foo
  937. $ cat bar
  938. bar
  939. $ cat foo bar >bar
  940. cat: input/output files 'bar' identical
  941. $ cat bar
  942. foo
  943.  
  944. -- 
  945. Marc Unangst, N8VRH         | "There are two ways to solve this problem:
  946. mju@mudos.ann-arbor.mi.us   | the hard way, and the easy way.  Let's start
  947.                             | with the hard way."
  948.                             |   - W. Scheider, from a Physics lecture
  949.  
  950. -----------------------------
  951.  
  952. From: Chris Maltby <chris@suite.sw.oz.au>
  953. Subject: Re: The Problem with UNIX
  954. Date: 16 Nov 92 06:21:56 GMT
  955. Sender: Usenet <news@softway.sw.oz.au>
  956. To:       unix-wizards@sem.brl.mil
  957.  
  958. In <1992Nov10.170423.10311@nttor.uucp> mike@nttor.uucp (Mike Hollander) writes:
  959.  
  960. >Things that bother me about the command line (I'm using Motorola
  961. >UNIX System V/68 Release 3.71 running a Korn shell using vi-type
  962. >command line editing on a VT420), in no particular order:
  963. >
  964. [6 (what, only 6!) shortcomings of ksh-vi deleted]
  965. >
  966. >That's a short list off the top off my head. If anyone has methods
  967. >to fix these complaints please feel free to respond!
  968.  
  969. I'd suggest that you do as was suggested by someone else in this thread.
  970. First read "cat -v considered harmful" and then consider whether your shell
  971. should contain a text editor, or whether your shell should co-operate with
  972. your text editor to solve your problem.
  973.  
  974. ksh, bash, zsh whatever - it's part of why Rob Pike and Boyd Roberts are
  975. making that sort of remark about UNIX. Underneath all that sludge is quite
  976. a nice operating system...
  977.  
  978. For your information, you'll find that rc (and my shell too :-) copy what
  979. you type into a history file. If you want to edit bits of that with sam,
  980. vi or even EMACS, it just works. Simple, isn't it.
  981. -- 
  982. Chris Maltby - Softway Pty Ltd        Internet: chris@softway.sw.oz.au
  983.  
  984. PHONE:    +61-2-698-2322    "I'm waiting for X-Windows to become just that;
  985. FAX:    +61-2-699-9174     Ex-Windows" - A McGrath.
  986.  
  987. -----------------------------
  988.  
  989. From: Alice Booth CT/90 <abooth@rcsuna.csun>
  990. Subject: Help!  Need to restore without backup
  991. Date: 13 Nov 92 19:33:58 GMT
  992. Sender: news@link.ph.gmr.com
  993. Followup-To: comp.sys.hp
  994. Nntp-Posting-Host: rcsuna.gmr.com
  995. To:       unix-wizards@sem.brl.mil
  996.  
  997.  
  998. Turns out the user's data was being stored beneath this subdirectory, and we do
  999. not have a backup. 
  1000.  
  1001. I've shutdown the machine and am looking for a person or a service organization    to help me restore the data if possible.  I understand that it may be possible to
  1002. recreate the inode table and thereby retrieve the user's data files.
  1003.  
  1004. Any help will be greatly appreciated!  This occurred on an HP9000/750 at
  1005. HP-UX 8.07.
  1006.  
  1007. -----------------------------
  1008.  
  1009. From: Alice Booth CT/90 <abooth@cmsa.gmr.com>
  1010. Subject: Re: Help!  Need to restore without backup
  1011. Date: 13 Nov 92 19:40:36 GMT
  1012. Sender: news@rphroy.ph.gmr.com
  1013. Followup-To: comp.sys.hp
  1014. Nntp-Posting-Host: rcsuna.gmr.com
  1015. To:       unix-wizards@sem.brl.mil
  1016.  
  1017. Please mail any helpful responses to 
  1018.   abooth@cmsa.gmr.com
  1019.  
  1020. Thanks.
  1021.  
  1022. -----------------------------
  1023.  
  1024. From: Forrest Aldrich <forrie@morwyn.uucp>
  1025. Subject: /bin/ps (SysVr2 -> SysVr3)
  1026. Date: 13 Nov 92 20:36:33 GMT
  1027. To:       unix-wizards@sem.brl.mil
  1028.  
  1029. I'm interested in creating a program that will report information similarly
  1030. to that of SysVr3 /bin/ps.  IE:  the full command line and command arguments,
  1031. in particular.  SysVr2 /bin/ps does not provide this functionality...
  1032.  
  1033. I've been told that this might be complicated because it requires that you
  1034. have to look out on the swap device for this info, and this can be very
  1035. platform specific.
  1036.  
  1037. Since this is SysVr2, and is older, I wonder if anyone might have some
  1038. sample code that I might be able to go by, or perhaps know of something
  1039. out there I could use to do this...  any help would be appreciated.
  1040. Thank you.
  1041.  
  1042.  
  1043. -- 
  1044.        -----------          Forrest Aldrich          -----------
  1045.        -------     morwyn!forrie@unhtel.unh.edu      -------
  1046.        ----                             ----
  1047.        --         VISION GRAPHICS --    Dover, NH - USA           --
  1048.        ------------------------------------------------------
  1049.  
  1050. -----------------------------
  1051.  
  1052. From: Ji-Tzay Yang <cp78065@csie.nctu.edu.tw>
  1053. Subject: asm. in UNIX
  1054. Date: 14 Nov 92 14:28:47 GMT
  1055. Sender: usenet@ccsun7.csie.nctu.edu.tw
  1056. X-Newsreader: TIN [version 1.1 PL6]
  1057. To:       unix-wizards@sem.brl.mil
  1058.  
  1059.  
  1060.  Hello, 
  1061.  
  1062.     The following is a very 'hard' question for me, because I can't find the
  1063.     information I need :-/
  1064.  
  1065.     if I want to write a piece of asm. codes in C on 386BSD.
  1066.     I can write :
  1067.  
  1068.        asm ("movl %ebx, %ebx");
  1069.  
  1070.     but what should I write if I want to move the address of varible 'foo'
  1071.     the '%eax'?
  1072.  
  1073.     void f() {
  1074.         int x, y;
  1075.  
  1076.         /* if we want 
  1077.            %eax = &x
  1078.            %ebx = y
  1079.         */
  1080.         asm("movl ___, %eax);
  1081.         asm("movl ___, %ebx);
  1082.     }
  1083.  
  1084.     By the way, are there any books or documnets discussing 
  1085.     the "inline asm" for UNIX?
  1086.  
  1087.     Hope there are kind people help me. 
  1088. --
  1089.                                          With regard,
  1090.  
  1091.  ============================================================================
  1092.  Ji-Tzay Yang (7( 0r 8|)              |  E-mail : cp78065@csie.nctu.edu.tw
  1093.  Dept. of Comp. Science & Info. Eng.  |           u7817065@cc.nctu.edu.tw 
  1094.  National Chiao-Tung University       |  Tel    : 886-35-712121 ext 6430 
  1095.  Hsin-Chu, Taiwan ROC                 |  Fax    : 886-35-721486 
  1096.  ============================================================================
  1097.  
  1098. -----------------------------
  1099.  
  1100. From: Norm MacNeil <norm@bcarh1ff.bnr.ca>
  1101. Subject: Re: >>TAR file on tape distroyed, are files recoverable?<<
  1102. Date: 14 Nov 92 21:44:13 GMT
  1103. Sender: Use Net <usenet@bcars6a8.bnr.ca>
  1104. Nntp-Posting-Host: bcarh1ff
  1105. To:       unix-wizards@sem.brl.mil
  1106.  
  1107.  
  1108. In article <1992Nov10.184320.5998@microware.com>, troyf@microware.com
  1109. (Troy Frericks) writes:
  1110. |> I have a tape that contained a large 'tar' file.  The data is not
  1111. |> replaceable.  The data that is needed is at the end of the tar
  1112. |> file, but it is inaccessable because the wrong parameter was
  1113. |> passed to tar when attempting to retrieve it.  The 'c' for
  1114. |> create, rather than 'x' for eXtract was passed, which caused
  1115. |> tar to write a tiny tar file over the beginning of the
  1116. |> larger one.
  1117. |> 
  1118. |> Any hints on how to retrieve files from a large tar file once
  1119. |> the beginning of the tar file has been distroyed?
  1120. |> 
  1121. Troy,
  1122.  
  1123.   I don't know if it'll work but try using dd.  For example,
  1124.     dd if=/dev/nrst0 of=/dev/null
  1125.   will read from the /dev/rst0 (non-rewinding) tape device and send the output
  1126.   to nothing.  This will get the tape point past the small file.  You should
  1127.   be able to type
  1128.     dd if=/dev/rst0 of=tar.file
  1129.   which will read the rest of the data off the tape and place it into tar.file.
  1130.   Now the problem is now to rectify the file so that tar can recogznie the
  1131.   format...
  1132.  
  1133.   This might be a start anyway.
  1134.  
  1135.     Norm.
  1136. +-----------------------------------------------------------------------+
  1137.  Norm MacNeil                     Phone: (613) 763-7497
  1138.  Data Systems                     Fax:   (613) 765-2854
  1139.  Bell-Northern Research Ltd.      EMail: norm@bnr.ca (INTERNET)
  1140.  #include <disclaimer.std>       "Roller bladers do it in-line!"
  1141.  
  1142. -----------------------------
  1143.  
  1144. From: Phil Romig <romig@cse.unl.edu>
  1145. Subject: fflush() on a socket
  1146. Keywords: flush,socket
  1147. Date: 14 Nov 92 23:40:51 GMT
  1148. NNTP-Posting-Host: cse.unl.edu
  1149. To:       unix-wizards@sem.brl.mil
  1150.  
  1151. Hello;
  1152.  
  1153. I need to know how to flush a socket.  I'm working on a distributed
  1154. application, with my sockets set for FNDELAY and FIOASYNC I/O.
  1155.  
  1156. The best solution would be to use fflush, but I have two problems. 
  1157. Under SUN 0/S fflush(NULL) causes a segmentation fault (so I can't do
  1158. that) and I can't figure out how to find the pointer to the stream
  1159. for a particular socket (all I have is the file descriptor).
  1160.  
  1161. The problem is complicated by the fact that I'm working on both
  1162. SUN O/S and and ULTRIX.  ULTRIX does not support much of the newer
  1163. "streamio" stuff.
  1164.  
  1165. Anyone have any ideas? 
  1166.  
  1167. Thanks for your help
  1168.  
  1169. -PHIL-
  1170. romig@cse.unl.edu
  1171. Department of Computer Science
  1172. University of Nebraska, Lincoln
  1173.  
  1174. -----------------------------
  1175.  
  1176. From: Kenneth Herron <kherron@ms.uky.edu>
  1177. Subject: Re: fflush() on a socket
  1178. Keywords: flush,socket
  1179. Date: 15 Nov 92 03:12:49 GMT
  1180. To:       unix-wizards@sem.brl.mil
  1181.  
  1182. romig@cse.unl.edu (Phil Romig) writes:
  1183.  
  1184. >The best solution would be to use fflush, but I have two problems. 
  1185. >Under SUN 0/S fflush(NULL) causes a segmentation fault (so I can't do
  1186. >that) and I can't figure out how to find the pointer to the stream
  1187. >for a particular socket (all I have is the file descriptor).
  1188.  
  1189. Well, I can't really tell you what the right course of action is, but
  1190. fflush() is a red herring.  If you had been using the stdio library
  1191. with this socket, fflush() would flush the stdio buffers.  You're not,
  1192. so there are no stdio buffers, only kernel-level buffers (or whatever
  1193. sockets use).
  1194. -- 
  1195. Kenneth Herron                                              kherron@ms.uky.edu
  1196. University of Kentucky                                         +1 606 257 2975
  1197. Dept. of Mathematics     "Your ball goes over them, it sails off the edge into
  1198. a huge cauldren of fire-breathing dragons."  "And they call this a par three?"
  1199.  
  1200. -----------------------------
  1201.  
  1202. From: Brian Fitzgerald <fitzgb@mml0.meche.rpi.edu>
  1203. Subject: Intro to comp.unix.wizards - read before posting! (weekly announcement, last change: Oct 29 00:48)
  1204. Date: 15 Nov 92 11:00:55 GMT
  1205. Expires: Tue, 15 Dec 1992 11:00:29 GMT
  1206. Followup-To: poster
  1207. Nntp-Posting-Host: mml0.meche.rpi.edu
  1208. To:       unix-wizards@sem.brl.mil
  1209.  
  1210. Please take a moment to read this before posting to comp.unix.wizards
  1211. for the first time.
  1212.  
  1213. comp.unix.wizards is for in-depth discussion of advanced unix topics.
  1214.  
  1215. Elementary questions do not belong in comp.unix.wizards.  Although some
  1216. socket questions (for example) are appropriate, "How do I program with
  1217. sockets?" is not.
  1218.  
  1219. Crossposting to comp.unix.wizards and comp.unix.questions is
  1220. inappropriate.  Plenty of wizards read comp.unix.questions and answer
  1221. questions there.
  1222.  
  1223. A wizard is someone who can rewrite the entire system from scratch.  If
  1224. you are not a wizard, you are welcome to follow along the discussions
  1225. anyway.  You'll learn quite a bit about how UNIX works.  Caution: post
  1226. to wizards only if you are yourself a wizard.
  1227.  
  1228. For a list of answers to frequently asked questions (FAQ), please refer
  1229. to comp.unix.questions (or comp.lang.c, news.answers, etc...).  "How do
  1230. I delete a file whose name starts with a '-' ?" is an example of such a
  1231. question.  Please do not ask or answer FAQ's on the net.
  1232.  
  1233. Write to Unix-Wizards-Request@BRL.MIL (Subject: subscribe.  Any
  1234. message.) if you want a daily digest of this newsgroup mailed to you.
  1235.  
  1236. To unsubscribe from the unix-wizards mailing list, send mail to
  1237. "info-unix-cancel@brl.mil", no text required.  It is incorrect to post
  1238. such requests to the list, or to mail them to me, though others may
  1239. mistakenly do so.
  1240.  
  1241. E-mail comments about this posting are welcome.  From time to time I'll
  1242. summarize them.
  1243.  
  1244. Brian
  1245. --
  1246. These opinions are mine, and do not necessarily reflect those of any
  1247. academic department or computing service at Rensselaer.
  1248.  
  1249. -----------------------------
  1250.  
  1251. From: Jeff Wandling <n8743196@henson.cc.wwu.edu>
  1252. Subject: amnesiac
  1253. Date: 15 Nov 92 11:10:15 GMT
  1254. To:       unix-wizards@sem.brl.mil
  1255.  
  1256.  
  1257. sunos% strings /usr/etc/getty | grep Amnesiac
  1258. Amnesiac
  1259.  
  1260. It may seem like a really trivial questiion, but I just wanted to know
  1261. why the string "Amnesiac" is in getty.  Could someone mail me the source?
  1262.  
  1263. -- 
  1264. ---
  1265. Jeff Wandling   <jdw@cmns.think.com>  "will hack for food"
  1266.  
  1267. -----------------------------
  1268.  
  1269. From: Wolfgang Prediger <wp@orion.erls01.siemens.de>
  1270. Subject: Re: amnesiac
  1271. Date: 16 Nov 92 07:49:03 GMT
  1272. Sender: news@kommu.uucp
  1273. X-Newsreader: TIN [version 1.1 PL6]
  1274. To:       unix-wizards@sem.brl.mil
  1275.  
  1276. Jeff Wandling (n8743196@henson.cc.wwu.edu) wrote:
  1277. > sunos% strings /usr/etc/getty | grep Amnesiac
  1278. > Amnesiac
  1279. > It may seem like a really trivial questiion, but I just wanted to know
  1280. > why the string "Amnesiac" is in getty.  Could someone mail me the source?
  1281. Amnesiac is shown in getty's login prompt if no hostname is set for
  1282. the machine.
  1283.  
  1284. That's all.
  1285.  
  1286. Wolfgang
  1287.  
  1288. --
  1289. Name : Wolfgang Prediger
  1290. Email: wp@orion.erls01.siemens.de
  1291. Snail: Siemens AG, AUT 482, Gleiwitzer Str. 555, 8500 Nuernberg Germany
  1292. Voice: +49 911 895 3155 (work)
  1293.  --- "Beam me up, Scotty, there's no intelligent life down here !" ---
  1294.  
  1295. -----------------------------
  1296.  
  1297. From: der Mouse <mouse@thunder.mcrcim.mcgill.edu>
  1298. Subject: Re: system call write
  1299. Date: 15 Nov 92 20:39:22 GMT
  1300. To:       unix-wizards@sem.brl.mil
  1301.  
  1302. In article <1992Nov13.164855.14013@tamsun.tamu.edu>, pnarayan@cs.tamu.edu (P S Narayan) writes:
  1303.  
  1304. > When I do a write (fd, buf, bytes), assuming that the file descriptor
  1305. > refers to an open block device say disk, is the kernel going to copy
  1306. > buf from user space to system buffer or is it going to flush it
  1307. > immediately onto disk ?
  1308.  
  1309. This is of course system-dependent.  Every system I know of (which for
  1310. knowledge at this level is restricted to BSD derivatives) will have
  1311. copied the data out of your buffer by the time write() returns.  The
  1312. relevant buffers in the buffer cache will be marked dirty and will be
  1313. flushed to disk at the next sync() or when buffers are needed for some
  1314. other use.
  1315.  
  1316. > In that case how can the user process without closing the files,
  1317. > ensure that his write system call flushes info onto disk ? Is there a
  1318. > way to do it ?
  1319.  
  1320. > My question is how can I get synchronous write ?
  1321.  
  1322. If you're accessing a file, I know of no way; at best you can make it
  1323. push the dirty pages immediately, but I don't know of any way to wait
  1324. until the I/O actually completes.  If you're using a special device, it
  1325. is of course up to the driver; all block special devices I know of
  1326. behave like files in this respect.  Character special devices are,
  1327. usually, better: they tend to wait until the I/O completes.
  1328.  
  1329. Of course, given things like caching disk controllers, it may not be
  1330. possible to tell whether the bits have actually reached the medium.
  1331.  
  1332.                     der Mouse
  1333.  
  1334.                 mouse@larry.mcrcim.mcgill.edu
  1335.  
  1336. -----------------------------
  1337.  
  1338. From: Domenico De Vitto <ddv@unix.brighton.ac.uk>
  1339. Subject: Thanks,
  1340. Date: 16 Nov 92 08:57:27 GMT
  1341. To:       unix-wizards@sem.brl.mil
  1342.  
  1343. Thanks to all who explained to me what RTFRFC means,
  1344. most were highly abusive and couldn,t F*CKING well see that I'm not 'on' the
  1345. internet, from my address, and I only have news access across JANet, but
  1346. if anyone wants a list of unix biggots, mail me.
  1347.  
  1348. 'wizzard' is a _relative_ term, and most at my uni (BSc comp sci) agree, I
  1349. need not prove it to you lot!
  1350.  
  1351. I did think that this group (that I've been reading for 2 years) had settled
  1352. down and didn't have any 'children' actively reading it, I was wrong (sadly).
  1353.  
  1354. Dom De Vitto
  1355.  
  1356. Dom De Vitto
  1357.  
  1358. -----------------------------
  1359.  
  1360.  
  1361. End of UNIX-WIZARDS Digest
  1362. **************************
  1363.  
  1364.