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

  1. Path: sparky!uunet!stanford.edu!rutgers!cmcl2!adm!news
  2. From: postmaster@ntsc-rd.navy.mil (SMTP MAILER)
  3. Newsgroups: comp.unix.questions
  4. Subject: Mail not delivered yet, still trying
  5. Message-ID: <34193@adm.brl.mil>
  6. Date: 22 Nov 92 16:46:27 GMT
  7. Sender: news@adm.brl.mil
  8. Lines: 2569
  9.  
  10.  
  11.  ----Mail status follows----
  12. Have been unable to send your mail to <slosser@ntsc-rd.navy.mil>,
  13. will keep trying for a total of three days.
  14. At that time your mail will be returned.
  15.  
  16.  ----Transcript of message follows----
  17. Date: 21 Nov 92 14:05:00 EST
  18. From: info-unix@BRL.MIL
  19. Subject: INFO-UNIX Digest  V17#003
  20. To: "rubel" <rubel@ntsc-rd.navy.mil>
  21. cc: "slosser" <slosser@ntsc-rd.navy.mil>
  22.  
  23. Return-Path: <info-unix-request@sem.brl.mil>
  24. Received: from SEM.BRL.MIL by ntsc-rd.navy.mil with SMTP ; 
  25.           Sat, 21 Nov 92 13:59:48 EST
  26. Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab23909; 21 Nov 92 6:05 EST
  27. Received: from sem.brl.mil by SEM.BRL.MIL id aa23746; 21 Nov 92 5:50 EST
  28. Date:       Sat, 21 Nov 92 10:50:00 EST
  29. From:       The Moderator (Mike Muuss) <Info-Unix-Request@BRL.MIL>
  30. To:         INFO-UNIX@BRL.MIL
  31. Reply-To:   INFO-UNIX@BRL.MIL
  32. Subject:    INFO-UNIX Digest  V17#003
  33. Message-ID:  <9211210550.aa23746@SEM.BRL.MIL>
  34.  
  35. INFO-UNIX Digest          Sat, 21 Nov 1992              V17#003
  36.  
  37. Today's Topics:
  38.                Fastest way to transfer whole filesystems?
  39.                            Re: IS UNIX DEAD?
  40.                              IS UNIX DEAD?
  41.                            Re: IS UNIX DEAD?
  42.                         Re: IS UNIX DEAD? (long)
  43.                  THE SOURCE TO NAMEDP, A FINGER PROGRAM
  44.                      Serious question - please read
  45.                         cron not finding script
  46.                       Re: cron not finding script
  47.                             PRINTCAP needed
  48.                Change Modification Date of Symbolic Link
  49.                        Reliable signals in Unix ?
  50.                        Running "dd" from .profile
  51.                      Re: Running "dd" from .profile
  52.            Proper way to read/write a struct from/to a socket
  53.          Re: Proper way to read/write a struct from/to a socket
  54.                      Need help with 'tar' command.
  55.                      2nd time:How to remove files?
  56.                    Re: 2nd time:How to remove files?
  57.                           Ride-Share Software
  58.                        Need help with "MAKEFILE"
  59.                     MAXOptics Earasble optical drive
  60.                       creeping featurism reference
  61.                  How do I make dynamic link libraries?
  62.                         Re: IS UNIX DEAD (long)
  63.                         Mail - signature files.
  64.        Re: Does anyone have any good insulting acronyms for VMS?
  65.             Re: Bourne Shell Programming Considered Harmful
  66.            Newmbox-length of mbox  != spool mailbox length!!
  67.           Re: Newmbox-length of mbox != spool mailbox length!!
  68.                   Help with generating random numbers
  69.                             Re: RFCs via FTP
  70.                        HELP: tech terms reference
  71.                                   grep
  72.                                 Re: grep
  73.                             Re: Vi-question
  74.    mmap() with shared access fails over NFS using AIX 3.2 on RS 6000
  75.                                PS command
  76.          (Q) SLIP, Xylogics Annex boxes, MacX, MacTCP, MacSLIP
  77.                              UUENCODE help!
  78.                   Printing within Uniplex spreadsheet
  79. -----------------------------------------------------------------
  80.  
  81. From: Susan Cole <cole@unix.sri.com>
  82. Subject: Fastest way to transfer whole filesystems?
  83. Date: 8 Nov 92 12:30:16 GMT
  84. Followup-To: comp.unix.admin
  85. To:       info-unix@sem.brl.mil
  86.  
  87. What's the fastest way to transfer an entire filesystem from one
  88. disk partition to another (different type disk, larger partition)?
  89. I thought that a tar would be much faster than a dump and restore
  90. from tape, but when I tried it, using a command like:
  91.  
  92.     tar cf - . | ( cd /otherfs; tar xpf - )
  93.  
  94. I got a surprising slow rate, something like 2 minutes per megabyte.  Am I
  95. using the wrong command, or using the right command the wrong way, or is this
  96. just an inevitably slow procedure?  What I'm moving is the news partition,
  97. and I've already learned that restoring it from dump tape is horribly slow.
  98. The system is a Sun SPARC machine.
  99.  
  100. Thanks for any assistance.
  101.  
  102. -----------------------------
  103.  
  104. From: Budi Rahardjo <rahardj@ccu.umanitoba.ca>
  105. Subject: Re: IS UNIX DEAD?
  106. Date: 10 Nov 92 02:26:45 GMT
  107.  
  108.  .hacktic.nl>
  109. Sender: news@ccu.umanitoba.ca
  110. Nntp-Posting-Host: antares.cc.umanitoba.ca
  111. To:       info-unix@sem.brl.mil
  112.  
  113. peter@global.hacktic.nl (Peter Busser) writes:
  114.  
  115. >rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:
  116.  
  117. >>>in a similar way. Tell me, how do I do that with UNIX?
  118. >>Well just buy a pre-configured Unix machine. 
  119.  
  120. >That'll cost extra because it takes a few hours to do that.
  121.  
  122. Nope. Looak at UnixWorld (and other magazine) they sell 486s with
  123.  
  124.  ...
  125. >You know how people learn using computers. But for some it's 'logical' and
  126. >therefore easy and for others it's black magic and difficult. A good system
  127. >should support people with all levels of knowledge. The Mac is a bad example,
  128. >it only supports 'stupid' users. 
  129.  
  130. I have different opinion. If somebody ask me what kind of computer to buy
  131. I always ask what they want to do with it and how 'deep' they want to get
  132. involve with the computer. Most of the time I suggested them to buy a Mac,
  133. because it's a better computer for them (most of them just want to use it
  134. for word processing or simple spreadsheet). The Mac will survive.
  135. (Note: I wouldn't buy a Mac, I am a power cmdline user :-)
  136.  
  137.  ...
  138. >>The problem with F3 approach is that F3 in one package is different with
  139. >>other package. F1 may be help in one program, but it's Exit in WordPerfect.
  140.  
  141. >F1 is a de facto standard key under MS-DOS. I've used many programs and 90%
  142. >has help (if any) under the F1 key.
  143.  
  144. Well, F1 in Word Perfect is different and most of the people I know here
  145. use Word Perfect.
  146.  
  147. >>Try CRISP.
  148.  
  149. >I might, if I get it to compile...
  150.  
  151. No, I mean the newer (comercial) version. I heard it's much better.
  152. I have used the old version and was impressed.
  153.  
  154.  ...
  155. >>Ever run .EXE file compiled for 386 on 8086 ?
  156.  
  157. >You mean that BSD/386 is to System V.4 what the 386 is to the 8086??? Or the
  158. >other way around??? It's obvious that a 386 executable does not run on a 8086,
  159. >but it really isn't that obvious that BSD/386 executables don't run under
  160. >Sys V.4. UNIX is UNIX right? And a 8086 is not a 386 right?
  161.  
  162. Ofcourse executables for BSD/386 would be different from Sys V.4 .
  163. They are different versions (one is BSD one is sys V). Just like running
  164. Windows 3.1 programs under Windows 2. 
  165.  
  166. Look, if Joe User doesn't want to learn a little, then stay away from UNIX
  167. and buy a Mac instead. He'll be happier. I mean why would he need a UNIX
  168. if all he wants to do is type a letter.
  169.  
  170. -- budi
  171. PS: I heard Sun is going to announce "something" tomorrow ?
  172.     What is it going to be ?
  173.  
  174. -- 
  175. Budi Rahardjo <Budi_Rahardjo@UManitoba.Ca>
  176. Unix Support - Computer Services - University of Manitoba
  177.  
  178. -----------------------------
  179.  
  180. From: "Hahn;Harley;;;;HAHN;personal;930630;" <harley@engrhub.ucsb.edu>
  181. Subject: IS UNIX DEAD?
  182. Date: 10 Nov 92 06:01:43 GMT
  183. Sender: news@hub.ucsb.edu
  184. To:       info-unix@sem.brl.mil
  185.  
  186.  
  187. This is number 10 in a series of 22 responses to the question:
  188.  
  189. What do you think about the Byte magazine cover that asked:
  190. IS UNIX DEAD?
  191.  
  192. (moderated by Harley Hahn)
  193.  
  194.  ----------
  195. From: dan@cedb.dpcsys.org (Dan Busarow)
  196.  
  197. I sincerely doubt it.  Microsoft and IBM both have a huge stake 
  198. in seeing their respective OS take over the market, and I think 
  199. that for the average DOS user Microsoft has already won the 
  200. battle with Windows, these users do not need NT nor is it 
  201. targeted at them. >From my brief experience with OS/2, I feel 
  202. that the only people who will use it are big IBM shops who like 
  203. the warm fuzzys they get by keeping the shop true blue.
  204.  
  205. The hype that this battle between IBM and Microsoft has generated 
  206. would lead one to believe that nothing currently exists to supply
  207. the role of a true multi-tasking OS on Intel machines.  This is 
  208. of course, untrue.  There are many Unix ports running on this 
  209. hardware already and there have been for several years.  The 
  210. marketing people at both companies have had to invent a need in 
  211. order to sell their product.
  212.  
  213. Unix already satisfies need which these two OS's purport to 
  214. solve, multi-tasking, networking and GUI's are all available and 
  215. Unix also throws in multi-user which these two seem to have 
  216. forgotten about.
  217.  
  218. We sell vertical market software for Unix systems and have seem a 
  219. continual growth in interest in Unix over the past several years.
  220. This growth in interest is not slowing down, in fact it seems to 
  221. be increasing as Open Systems awareness comes to more people.
  222.  
  223. This (Open Systems) is where Unix has always shined and always 
  224. will. Sure, Microsoft may port to MIPS and Alpha chips as well as 
  225. Intel but three processors out of the hundreds out there hardly 
  226. qualifies. I haven't heard about IBM's plans for OS/2 in this 
  227. regard but I don't see the Closed Systems giant licensing there 
  228. product to other vendors at a reasonable price as a very likely 
  229. event.  Have you seen what the are asking for the APPC license?  
  230. 100,00K and up to license a networking protocol!  Amazing.
  231.  
  232. While USL and the Unix vendors most definitely want and need to 
  233. make money from their products I do not think that they have the 
  234. megalomania of either Microsoft or IBM.  Therefore we will 
  235. continue to see advances in Unix coming out of small and not so 
  236. small companies who are dedicated to continuing the growth of the 
  237. Unix market.
  238.  
  239. I've rambled a bit, again the key to me is that Microsoft and IBM 
  240. are trying to convince the world that they have THE solution for 
  241. all our computing problems when in fact, they have just given us 
  242. a couple more OS's that do what Unix ALREADY does.
  243.  
  244. ==========
  245.  
  246.  
  247. -----------------------------
  248.  
  249. From: "Marc G. Frank" <mgfrank@avernus.com>
  250. Subject: Re: IS UNIX DEAD?
  251. Date: 10 Nov 92 21:20:13 GMT
  252. To:       info-unix@sem.brl.mil
  253.  
  254. In article <BxGu2H.A62@undergrad.math.waterloo.edu> papresco@napier.uwaterloo.ca (Paul Prescod) writes:
  255. >Why is it, in VI if I try to save a file without a name it doesn't prompt
  256. >me for a name?  Instead it kicks me back to vi.  Or if I try to quit without
  257. >saving.  Why doesn't it ask me "Save y/n."  There is no reason VI couldn't
  258. >have an "expert" mode that got rid of messages for those that don't want
  259. >them.
  260.  
  261. Because that's not how vi works.  But if you don't like it, get elvis
  262. and *change* it.  That's what the source is for.  How come I can't quit
  263. WordPerfect without it asking me if I'm really really really really sure
  264. I want to quit, even though I clearly typed the quit key?  How come I
  265. can't supress that behavior?  Where can I get the WP source so I can fix
  266. it?
  267.  
  268. >Why is it, in VI that there is no way (I know of) to get help, or exit,
  269. >without knowing the exit key?  What doesn't "h" in command mode present
  270. >ANY kind of help?
  271.  
  272. Why can't I quit QEdit or MS-DOS 5 edit or WordPerfect or Windows
  273. without knowing the exit key?  How come I can't get the computer to work
  274. if I don't turn it on?  What the hell am I supposed to do if I can't
  275. find the switch?  I could call tech support, but I don't know how to
  276. dial a phone!
  277.  
  278. >Why is it, in RN that when I hit 'h' to ask about how to find a command,
  279. >it doesn't give me a menu "message read commands","post commands" "misc
  280. >commands."  Instead it makes me read two pages of (mostly useless) commands.
  281.  
  282. Because that way you don't have to waste keystrokes going through
  283. useless menus when all the available options can be displayed on a
  284. couple of pages, which you can abort as soon as you find the key you're
  285. looking for.
  286.  
  287. >Why don't Unix "tools" have a convention about help and exit keys AT THE
  288. >VERY LEAST.  
  289.  
  290. UNIX "tools" aren't even supposed to be interactive.
  291.  
  292. >Where am I supposd to get help about VI?  The man pages tell me nothing
  293. >except how to load it.
  294.  
  295. Well, if you're the bookish sort you could get Linda Lamb's excellent
  296. book *Learning the vi Editor*, a Nutshell Handbook published by O'Reilly
  297. & Associates.
  298.  
  299. If you're not, you could always ask someone.
  300.  
  301. >Why do I have 12 function keys on my keyboard that seem to do absolutely
  302. >nothing?
  303.  
  304. Because you haven't bothered to program them yet?
  305.  
  306. >Why doesn't help do anything in SH (and others).
  307.  
  308. Answer 1: Because that's what "man" is for.
  309. Answer 2: In bash:
  310.  
  311. 11:51:32 mgfrank [1/2048] ~ $help if
  312. if: if COMMANDS; then COMMANDS; [else COMMANDS;] fi
  313.     `if' executes the `then' COMMANDS only if the final command in the
  314.     `if' COMMANDS has an exit status of zero.
  315. 11:51:39 mgfrank [2/2049] ~ $
  316.  
  317. >Why doesn't help do anything in VI?
  318.  
  319. For the same reason that :q! doesn't exit the file without saving in
  320. Microsoft Word.
  321.  
  322. >Why does VI default to beeping at you when you try to type as opposed to
  323. >editing?
  324.  
  325. For the same reason that WordPerfect inserts characters when I try to
  326. move the cursor back with h.
  327.  
  328. HINT: Because they aren't the same program.
  329.  
  330.  
  331. >Why is it that if I want to WordProcess in VI I have to remember to hit return at the end of the line otherwise bizarre things happen.  Why not just wrap, beep, or slide over (i.e. let the line go long). 
  332.  
  333. Because you didn't turn wordwrap on?
  334.  
  335. >Is there a wordwrap mode in VI?  And if so, why doesn't it kick in when I
  336. >use VI from RN?
  337.  
  338. Because you didn't bother putting "set wrapmargin=8" in your .exrc?
  339.  
  340. --
  341. Marc G. Frank                          Gee, Canada's sure looking good right
  342. mgfrank@avernus.com                    about now, isn't it?
  343.  
  344. -----------------------------
  345.  
  346. From: Jeff Wasilko <Jeff@digtype.airage.com>
  347. Subject: Re: IS UNIX DEAD?
  348. Date: 11 Nov 92 04:02:06 GMT
  349. X-Mailer: uAccess - Macintosh Release: 1.6v1
  350. To:       info-unix@sem.brl.mil
  351.  
  352.  
  353. In article <1992Nov9.191810.22019@slate.mines.colorado.edu> (comp.unix.questions), mbarkah@slate.mines.colorado.edu (Ade Barkah) writes:
  354. > papresco@undergrad.math.waterloo.edu (Paul Prescod) writes:
  355. > : [discussion about people should have CD-ROMs deleted]
  356. > : BUT THEY HAVEN'T.  SO WHO CARES!  Sure the world would be a better place
  357. > : if everyone had CD-ROMs.  But if they *DON'T* then selling an OS only
  358. > : on CD-ROM is sorta silly, isn't it!
  359. > Well, that's a weak argument. Just as you wouldn't expect the Grolier
  360. > Encyclopaedia to ship on floppies, one shouldn't expect that all versions
  361. > of Unix are available on floppies. It may not be practical. To give
  362. > you an example, (if I remember correctly) the complete info-explorer
  363. > manual pages for the IBM RS/6000 & the AIX operating system _alone_ is 
  364. > over 200 megabytes, and is shipped on CD-ROMs. And we haven't touched the
  365. > operating system code. Who wants *that* on floppies ?
  366.  
  367. Sun now ships all of their servers with CD-ROM standard. You can't
  368. buy the OS on anything other than CD-ROM. 
  369.  
  370. Sun has also put their full documentation on CD-ROM--it's called Answerbook.
  371. It includes Postscript versions of all of the standard man pages,
  372. plus the full paper documentation set (normally 8 or so volumes weighing
  373. in at 80 or so pounds!). I also have hardware and configuration manuals
  374. for most of the desktop systems. It completely fills a 600 meg CD.
  375.  
  376. All of these things are on-line, fully-indexed, cross-referenced and
  377. hypertext-linked, and just a command away. Just today, I was looking 
  378. for info on how the sticky bit affects directories. I just fired up
  379. the searcher and typed in 'sticky'. I had 3 hits, and found my answer
  380. in just a couple of seconds. I could have never done this with paper
  381. documentation.
  382.  
  383. Unix is a bit cryptic, and the sheer volume of documentation is overwhelming
  384. at times. Having it all shrunk down to a fully indexed CD where I
  385. have a prayer of finding what I want makes things a lot easier!
  386.  
  387. CD-ROMs could be the saviour of UNIX.....
  388.  
  389. Jeff
  390.  
  391. --
  392. Jeff's Oasis at Home.                   Jeff can also be reached at work at:
  393.                                                         jwasilko@airage.com
  394. "A system admin's life is a sorry one.  The only advantage he has over
  395. Emergency Room doctors is that malpractice suits are rare.  On the other
  396. hand, ER doctors never have to deal with patients installing new versions
  397. of their own innards!"  -Michael O'Brien
  398.  
  399. -----------------------------
  400.  
  401. From: Paul Prescod <papresco@napier.uwaterloo.ca>
  402. Subject: Re: IS UNIX DEAD?
  403. Date: 11 Nov 92 21:27:33 GMT
  404. Sender: news@undergrad.math.waterloo.edu
  405. To:       info-unix@sem.brl.mil
  406.  
  407. >Yes, but when will it be available ? Solaris 2.0 will be ready by then.
  408.  
  409. I hope so, and I hope it's everything I dream it will be.  But if it is,
  410. it won't be the unix that some people here know and love.  It may have some
  411. ease-of-use enhancements.  It will probably be graphical.  It may "pander
  412. to the lowest common denominator."  I'm crossing my fingers.
  413.  
  414. >If Joe User prefers a comercial program why not go with SCO or NeXTstep.
  415. >
  416. Because a NeXT costs >$5000.00 (for greyscale) and a PC with scos almost
  417. as much.  SCO costs more then many systems for sale today.
  418.  
  419. -----------------------------
  420.  
  421. From: Martin McCormick <martin@datacomm.ucc.okstate.edu>
  422. Subject: Re: IS UNIX DEAD?
  423. Date: 11 Nov 92 21:54:09 GMT
  424. Sender: USENET News System <news@osuunx.ucc.okstate.edu>
  425. Nntp-Posting-Host: datacomm.ucc.okstate.edu
  426. To:       info-unix@sem.brl.mil
  427.  
  428. In article <0105002B.ibrvd6@digtype.airage.com> jeff@digtype.airage.com writes:
  429. >Sun has also put their full documentation on CD-ROM--it's called Answerbook.
  430. >It includes Postscript versions of all of the standard man pages,
  431. >plus the full paper documentation set (normally 8 or so volumes weighing
  432. >in at 80 or so pounds!). I also have hardware and configuration manuals
  433. >for most of the desktop systems. It completely fills a 600 meg CD.
  434.  
  435. First, I completely agree with Jeff's enthusiasm for this system.  It is good
  436. and probably is the wave of the future.  I do have one gripe, however.
  437. As I have said, in other postings, Postscript is a half-finished job until
  438. somebody comes up with a method for converting it back into standard ASCII
  439. text like the lines you are reading, now.  The windows-oriented approach is
  440. totally useless for those of us who are blind and use speech synthesizers.
  441. We were able to cobble together a small C program to strip out all that
  442. Postscript language and display a completely deformatted stream of data.
  443. It beats nothing, though not by much.  I would love to help fix this problem,
  444. but I need to find a document explaining Postscript in electronic form so
  445. I can read it and figure out how to tackle this beast.
  446.  
  447. >
  448. >All of these things are on-line, fully-indexed, cross-referenced and
  449. >hypertext-linked, and just a command away. Just today, I was looking 
  450. >for info on how the sticky bit affects directories. I just fired up
  451. >the searcher and typed in 'sticky'. I had 3 hits, and found my answer
  452. >in just a couple of seconds. I could have never done this with paper
  453. >documentation.
  454.  
  455. To do that with the system I use, you look through the directory until
  456. you find a likely-looking title and then strip the Postscript from it.
  457. Next, use "less's" text finding capability to look for the string.  It works,
  458. but it is as slow as molasses in January, and you run the risk of missing
  459. important information which might be in files whose names don't betray
  460. the knowledge, within.  
  461.     As I have also said, before, I realize that not all formatting effects
  462. could be duplicated on non-graphical terminals, but a good Postscript-to-ASCII
  463. converter would simply do what it could with what it had.  Then, we could
  464. all use the hypertext capabilities for indexing.
  465.  
  466. >
  467. >Unix is a bit cryptic, and the sheer volume of documentation is overwhelming
  468. >at times. Having it all shrunk down to a fully indexed CD where I
  469. >have a prayer of finding what I want makes things a lot easier!
  470. >
  471. >CD-ROMs could be the saviour of UNIX.....
  472.  
  473. If handled right, they could be the answer to all kinds of problems.  So far,
  474. for anybody needing non-standard output, they are just another headache.
  475.  
  476. This doesn't mean I disagree with anything said, here, or I hate Windows
  477. or anything more than that we need to look long and hard at the slash-and-burn
  478. approach which seems to have taken over the data I/O business.  We are creating
  479. a Tower of Babyl which seems to be creating more and more specialized forms
  480. of I/O rather than trying to create universal formats that have unlimited
  481. utility.
  482.     There are software solutions which are beginning to make Window formats
  483. available to the blind, but my problem is that in order to use the "AnswerBook"
  484. or any similarly formatted output, any user must have a graphics terminal
  485. such as another Sun work station to access the data.  This is nice if you are
  486. selling Suns, but quite limiting if you have a perfectly good PC/XT running
  487. "Kermit" at home.
  488.  
  489. Martin McCormick WB5AGZ   Stillwater, OK
  490. O.S.U. Computer Center Data Communications Group
  491.  
  492. -----------------------------
  493.  
  494. From: Budi Rahardjo <rahardj@ccu.umanitoba.ca>
  495. Subject: Re: IS UNIX DEAD? (long)
  496. Date: 10 Nov 92 02:35:56 GMT
  497. Sender: news@ccu.umanitoba.ca
  498. Nntp-Posting-Host: antares.cc.umanitoba.ca
  499. To:       info-unix@sem.brl.mil
  500.  
  501. peter@global.hacktic.nl (Peter Busser) writes:
  502.  
  503. >rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:
  504.  
  505. >>Why is that more intuitive than 'ls' ? I have to learn CAT ,D2 ...
  506. >>Why is that important to have DIR. You can setup 'dir' as an alias for 'ls'.
  507. >>ls -l is not as difficult as  DIR /W
  508.  
  509. >Not *because* it is ls, but because most people know DIR and don't know ls. 
  510.  
  511. I am not so sure about that. If s/he knows about DIR then it's easier
  512. to teach her/him to remember ls. I taught some people with DOS
  513. background to use UNIX, in around 3 hours. They can edit a file (with 'pico',
  514. don't bother teaching vi :-), use elm, print a file, do ftp, hytelnet, gopher,
  515. (and some even try nn :-) and use X Window (Open Windows).
  516.  
  517. -- budi
  518. -- 
  519. Budi Rahardjo <Budi_Rahardjo@UManitoba.Ca>
  520. Unix Support - Computer Services - University of Manitoba
  521.  
  522. -----------------------------
  523.  
  524. From: Leslie Mikesell <les@chinet.chi.il.us>
  525. Subject: Re: IS UNIX DEAD? (long)
  526. Date: 11 Nov 92 05:31:21 GMT
  527. To:       info-unix@sem.brl.mil
  528.  
  529. In article <BxGu2H.A62@undergrad.math.waterloo.edu> papresco@napier.uwaterloo.ca (Paul Prescod) writes:
  530. >Why is it, in VI if I try to save a file without a name it doesn't prompt
  531. >me for a name? 
  532. [and many more similar questions]
  533.  
  534. The simple answer is that these programs were written in an era when
  535. computers were expensive and impressive enough that people were expected
  536. to read the manuals before touching them.  While I happen to like vi
  537. (and the other user-unfriendly programs you mentioned), I agree that
  538. times have changed.  No one starting to use computers now is going to
  539. put up with the terse interfaces designed years ago and no one cares
  540. anymore that it is more efficient to be terse. 
  541.  
  542. >Why don't Unix "tools" have a convention about help and exit keys AT THE
  543. >VERY LEAST.  
  544.  
  545. This is a little different - the tool functionality kind of depends on
  546. processing to end-of-file (so exit is normally ^D if you are typing
  547. to them from a terminal). And since they are typically used in pipelines
  548. an interactive style "help" wouldn't be available anyway.
  549.  
  550. Les Mikesell
  551.   les@chinet.chi.il.us
  552.  
  553. -----------------------------
  554.  
  555. From: Paul Prescod <papresco@napier.uwaterloo.ca>
  556. Subject: Re: IS UNIX DEAD? (long)
  557. Date: 11 Nov 92 21:22:03 GMT
  558. Sender: news@undergrad.math.waterloo.edu
  559. To:       info-unix@sem.brl.mil
  560.  
  561. >Hey, why doesn't my toaster ask me for confirmation if I press the little
  562. >bar without inserting any bread?
  563.  
  564. Try it, it will usually pop up after a few seconds.
  565.  
  566. >>Why is it, in VI that there is no way (I know of) to get help, or exit,
  567. >>without knowing the exit key?  What doesn't "h" in command mode present
  568. >>ANY kind of help?
  569. >
  570. >Why doesn't my hard drive realize that I didn't really want to delete
  571. >that data?  Why don't I have a team of ergonomics specialists sitting
  572. >at my desk doing all my typing by dictation?
  573.  
  574. Two different things.  Asking for a help key is really not as 
  575. "pampered" as you would make it out.  As far as the hard drive:
  576. OS/2 and DOS both have reasonably good undelete procedures.  OS/2 just
  577. copies the file to a temporary directory in the background.
  578.  
  579. >Again, vi is not a drop-in replacement for Microsoft Write.  It's
  580. >an extremely powerful editor of text files.  If you want to whine,
  581. >consider asking Microsoft why they don't have a command line in
  582. >their editors.
  583.  
  584. Microsoft has a  *PROGRAMMING LANGUAGE* built into word.  I can't
  585. imagine why someone would prefer a command line to keystrokes
  586. and requester windows.     
  587. >
  588. >>Why don't Unix "tools" have a convention about help and exit keys AT THE
  589. >>VERY LEAST.  
  590. >
  591. >Control-C works for me.  That, or Control-Z kill %1.
  592.  
  593. And assembly is a high level language..right.  And your programming language
  594. of choice is binary.
  595.  
  596. >Your lack of attentiveness is simply not our problem.  The bottom of
  597. >every man page I've seen about 'vi' contains a pointer to the actual
  598. >vi manual.
  599.  
  600. Would you like me to mail you our man pages or will you take my word for it
  601. that it says nothing about other man pages.
  602.  
  603. >>Why do I have 12 function keys on my keyboard that seem to do absolutely
  604. >>nothing?
  605. >
  606. >dumb question is this?  Are you blaming your keyboard manufacturer's
  607. >ills on Unix, or are you incoherently expecting that Unix assign some
  608. >sort of meaning to every key assignable?
  609.  
  610. No it's not a dumb question.  There is no standard for help in the Unix
  611. world.  The f keys are seldom used in unix programs.  Most terminals
  612. have f keys.  It would seem this would be a good time to start convincing
  613. people to use F1 for help, n'est ce pas?
  614.  
  615. >>Why doesn't VI use the jkl; keys for cursor movement, since your fingers
  616. >>are already on them.  Or why not use keys somewhere far from them.  A
  617. >>person can easily get confused.
  618. >
  619. >Whose fingers are already on them?  Not mine.  If you're having a hard
  620. >time moving your fingers one key away, might I recommend not using
  621. >a computer?  These things are dangerous.
  622.  
  623. It's got nothing to do with difficulty.  It has to do with intelligence.
  624. With 95% of all keyboards having little bumps on the "home" key it makes
  625. absolutely NO SENSE to use keys one character right of the home keys
  626. as cursor keys.  None whatsoever.  Espeicially when h could be a help
  627. key, instead of wasted on the right arrow, when J should be the right
  628. arrow.
  629.  
  630. >>Why does VI default to beeping at you when you try to type as opposed to
  631. >>editing?
  632. >
  633. >Because you're Making a Mistake, and vi appropriately tells you so.
  634.  
  635. Why is typing text into a text editor "a mistake."  VI should default
  636. to typing mode.  It would 100% or more user friendly, as well as compatible
  637. with the other 1000 programs out there that claim to be editors. 
  638.  
  639. >Again, you're confused.  My vi, and every vi I have used, has dealt with
  640. >too-long lines in a rational manner.  All my vis also have word-wrap,
  641. >which you would discover if you took the time to read the man page and
  642. >read the manual listed at the end of the man page.
  643.  
  644. Sigh.  See above.
  645.  
  646. >>Is there a wordwrap mode in VI?  And if so, why doesn't it kick in when I
  647. >>use VI from RN?
  648. >
  649. >a) yes.  b) because your .exrc file is not set up correctly.
  650.  
  651. How often does someone want to edit news without word wrap?  Wouldn't that
  652. make it logical to put word wrap in the standard .exrc file?
  653.  
  654. >Hey, I'm getting into the rhythm of this.  Let me try:
  655. >
  656. >Why is it that people who have no idea how to use Unix and who think
  657. >that it should operate at the lowest common denominator keep asking
  658. >stupid questions?
  659.  
  660. Because they are not stupid questions.  They are good questions.  Obviously
  661. VI has flaws.  Obviously unix has flaws.  Everything has flaws.  It is
  662. frightening the way many Unix users refuse to admit that Unix has flaws.
  663.  
  664. If you launch an editor from VI, that editor should be a wordprocessor.  If
  665. it is vi, vi should be in wordprocess mode.  If it doesn't, that is a flaw.
  666.  
  667. If help does nothing at the command prompt.  That is a flaw.
  668.  
  669. If the cursor keys are illogical that is a flaw.
  670.  
  671. Anything can be improved if we discuss the flaws and discuss ways to improve
  672. them.  If we treat those that notice flaws as blasphemers, we all end up
  673. using 1970s text editors in 1992, and unix dies.
  674.  
  675. -----------------------------
  676.  
  677. From: Paul Prescod <papresco@napier.uwaterloo.ca>
  678. Subject: Re: IS UNIX DEAD? (long)
  679. Date: 11 Nov 92 21:36:08 GMT
  680. Sender: news@undergrad.math.waterloo.edu
  681. To:       info-unix@sem.brl.mil
  682.  
  683. >>Why doesn't VI use the jkl; keys for cursor movement, since your fingers
  684. >>are already on them.  Or why not use keys somewhere far from them.  A
  685. >>person can easily get confused.
  686. >
  687. >That is one of the nice features of vi.   The hjkl keys are where you
  688. >normally place your fingers and in command mode h moves you left, j
  689. >down, k up and l right.   I guess you just didn't try them.   And if
  690. >your terminal is configured properly you can use the arrow keys too.
  691.  
  692. What touch typing course did you take?  asdfjkl;.  I practiced them 
  693. for hours.  That's why most keyboards have little bumps on j and f,
  694. so you can find them without looking.  Does it make much sense to
  695. "find them without looking" and then shift my fingers to move around?
  696. Besides, why waste the h key.  It is very valuable...it should be help!
  697.  
  698. >Yes - I noticed that you let the words continue on a very long line.
  699. >But since vi needs to be a program editor too, there are options of
  700. >continuing long lines, or to have them wrap just like vi is doing for
  701. >me right now.   set wrapmargin=5 will do nicely.
  702.  
  703. Does VI need to be program editor when I'm in RN?  Surely RN could set
  704. VI to word wrap mode, as I am certain they work together often.
  705.  
  706. -----------------------------
  707.  
  708. From: Paul Prescod <papresco@napier.uwaterloo.ca>
  709. Subject: Re: IS UNIX DEAD? (long)
  710. Date: 11 Nov 92 21:46:05 GMT
  711. Sender: news@undergrad.math.waterloo.edu
  712. To:       info-unix@sem.brl.mil
  713.  
  714. > BTW, I do think you all are overestimating the power of the "average
  715. >user" when it comes to deciding the course of the PC world. The "average
  716. >user" couldn't afford to buy a machine powerful enough to run GUIs when
  717. >they first came out, but look where we went... Yeah, Joe Stupid may be a
  718. >large part of it, but he ain't the only thing determining what the next
  719. >operating system will be. (We all gotta keep in mind that not every
  720. >"average user" is stupid to the core, as several of the "common user
  721. >advocates" have suggested.)
  722.  
  723. Overestimating the power of the "average user?"  Underestimating his/her
  724. intelligence?  Not me!
  725.  
  726. Look at the most popular operating system today: DOS.  A 1970s cpm rehash
  727. with a 640k memory limit.  Guis took off when Joe Average could afford
  728. to buy a gui based computer.  It's not that they are stupid, just poorly
  729. informed.  Many, many people don't know there are opearting systems
  730. other then DOS.  Those that do, usually crinkle their noses if you tell
  731. them about Unix.  "I heard that has a brutal learning curve."
  732.  
  733. In other words, while "average users" are smart, they are not computer
  734. literate, they don't know a good OS from a bad one, and they will not
  735. use something with a reputation for user-unfriendliness.
  736.  
  737. -----------------------------
  738.  
  739. From: Steve Franklin <franklin@ug.cs.dal.ca>
  740. Subject: THE SOURCE TO NAMEDP, A FINGER PROGRAM
  741. Date: 10 Nov 92 14:07:09 GMT
  742. Sender: USENET News <usenet@cs.dal.ca>
  743. Nntp-Posting-Host: ug2.cs.dal.ca
  744. To:       info-unix@sem.brl.mil
  745.  
  746. Here's the source to NAMEDP. I'm not sure if it made it to the group already.
  747. This is the 4th time I have posted it. I think I mucked up the last time.
  748.  Please do not mail me asking for help, unless
  749. a) i know you
  750. b) You can make me laugh.
  751.    Otherwise I have no time to help you install it.
  752. steve
  753.  
  754. # This is a shell archive.  Remove anything before this line,
  755. # then unpack it by saving it in a file and typing "sh file".
  756. #
  757. # Wrapped by Scratchy <napalm@molest> on Wed Jan 15 12:32:17 1992
  758. #
  759. # This archive contains:
  760. #    README        MANIFEST    Makefile    logfinger    
  761. #    plan.c        plan.nr        
  762. #
  763. # Existing files will not be overwritten.
  764. # Error checking via wc(1) will be performed.
  765. # Error checking via sum(1) will be performed.
  766.  
  767. LANG=""; export LANG
  768. PATH=/bin:/usr/bin:$PATH; export PATH
  769.  
  770. if sum -r </dev/null >/dev/null 2>&1
  771. then
  772.     sumopt='-r'
  773. else
  774.     sumopt=''
  775. fi
  776.  
  777. if test -f README
  778. then
  779.     echo Ok to overwrite existing file README\?
  780.     read answer
  781.     case "$answer" in
  782.     [yY]*)    echo Proceeding;;
  783.     *)    echo Aborting; exit 1;;
  784.     esac
  785.     rm -f README
  786.     if test -f README
  787.     then
  788.         echo Error: could not remove README, aborting
  789.         exit 1
  790.     fi
  791. fi
  792. echo x - README
  793. cat >README <<'@EOF'
  794. All I did was to put in a function that keeps track of the PID for
  795. plan by writing it to a file called ".planpid" in your home directory.
  796. Now you run plan in your .login, and, to kill the process when you log
  797. out, put something like this in your .logout:
  798.  
  799.     kill `cat /home/mine/.planpid`
  800.     rm -f /home/mine/.planpid
  801.  
  802. You have to remove the .planpid (or modify the code), because the 
  803. program will not run if a plan is already running, which it assumes
  804. when it finds a .planpid file already there.
  805.  
  806. If someone wanted to run multiple plans, maybe one for a .signature
  807. and another for a .plan, the save name for the PID could be changed,
  808. and the program compiled twice (the binary is not that big, ~40K on
  809. the HP 425's I used), or, if someone is really motivated, they could
  810. add a command line argument for the save name.
  811.  
  812. Sure, my modification isn't very complex, but it does what I needed
  813. it to do, and maybe someone else can use it.
  814.  
  815. Karen    (napalm@ugcs.caltech.edu)
  816.  
  817. ****  Additions by Geoff Loker ****
  818.  
  819. I have modified Tony Rems' code for plan a bit to get rid of the
  820. necessity for hard-coding in the file name to be set up as a FIFO.
  821. The program will now accept an optional argument that specifies the
  822. name of the FIFO to be used.  If that argument is not set, the default
  823. FIFO is $HOME/.plan.
  824.  
  825. In order to use this program, your O/S needs to support named pipes.
  826. You also need to link in getopt for the changes to work.
  827.  
  828. Any executable program can be set up to run when the specified FIFO is
  829. opened, but don't forget that the program you specify to run is being
  830. run under your userid.
  831.  
  832. ****  Original README ****
  833.  
  834. Date: Thu, 11 Apr 91 14:09:10 MST
  835. From: Jim Armstrong <armstron@cs.arizona.edu>
  836. Subject: RE: fingeree ...
  837.  
  838. > >About a month ago there was a sample program posted to this newsgroup that
  839. > >set up a FIFO named pipe as your .plan file.  I modified the code to set up
  840. > >a simple (perhaps naive) finger monitor for users on my machine.  The process
  841. > do you still have the source for it? would you send it to me?
  842.  
  843. Here is the article which appeared in comp.unix.questions a while back.  It
  844. contains generic code that will run any program you want whenever a certain
  845. file is accessed (i.e. the .plan file in this case).  All you have to do is
  846. compile it (it creates an executable called 'plan') and then to get it
  847. running say 'plan a.out &' where a.out is some program you have written.
  848. I don't have my program any more, but basically what I did was a ps au
  849. within that program.  It used egrep to search for someone currently fingering
  850. me and appended the output to a file.  To get really fancy you could then
  851. read from that file to find out exactly who it is (all in the same program)
  852. and print out a nice personal message to whoever is fingering you as part
  853. of what looks to be your .plan file.  A couple of things to watch out for:
  854. If the finger is remote, the ps au won't find anything.  Also, if two people
  855. finger you at the same time you may run into trouble, but I didn't try
  856. experimenting with this too much.  I also found it helpful to timestamp a
  857. date to the file, too (I used localtime() for efficiency).  This makes it
  858. easier to look back later at the file and see who's been fingering you and
  859. when while you were not logged on.  It also helpful in debugging your program.
  860.  
  861. So set up this code and experiment with different programs.  Just be creative
  862. and see what else you can do with it.  One idea I used for a while is making
  863. it print a different quote each time.  The possibilites are endless.  Enjoy.
  864.  
  865. Jim
  866.  
  867.  
  868. Article 31270 of comp.unix.questions:
  869. From: rembo@unisoft.UUCP (Tony Rems)
  870. Newsgroups: comp.unix.questions
  871. Subject: Re: Finger
  872. Date: 22 Feb 91 02:44:17 GMT
  873. Reply-To: rembo@unisoft.UUCP (Tony Rems)
  874. Organization: UniSoft Corporation -- UNIX R Us.
  875.  
  876. In article <37675@netnews.upenn.edu> minzhi@eniac.seas.upenn.edu (Min-Zhi Shao) writes:
  877. >
  878. >    When I fingered our system administrator, I got the following result:
  879. >
  880. >_________________________________________________________________________
  881. >Login name: gardella              In real life: Ed Gardella [CETS]
  882. >Directory: /home/cets/gardella          Shell: /usr/local/bin/bash
  883. >On since Feb 15 19:49:04 on ttyp1 from TSTEST.SEAS.UPEN
  884. >14 minutes Idle Time
  885. >No unread mail
  886. >Project: System Administrator eniac.seas.upenn.edu
  887. >Plan:
  888. >         Meander about until something interesting comes along.
  889. >
  890. >Office: 154 Moore Building           Work Phone: 898-2491
  891. >                                     Home Phone: 387-4104
  892. >
  893. >I have been fingered 3 times today
  894. >_________________________________________________________________________
  895. >
  896. >the .plan file in his home directory looks like:
  897. >
  898. >prw-r--r--  1 gardella        0 Feb 15 23:48 /home/cets/gardella/.plan
  899. >^
  900.  
  901. As you have found out by now, I'm sure, the p means that this is 
  902. a named pipe aka a FIFO.  If you'd like to do this yourself, here
  903. is a little program I wrote to do it (see the comments at the
  904. the beginning of the plan.c file for usage info):  
  905.  
  906. Here's the shar of my plan program, just cut up until it says
  907. "cut here", and then type 'sh filename' using whatever filename
  908. you save it as.  If you use 'plan' it will get overwritten.
  909.  
  910. The code here should compile w/o any problems on any BSD machine,
  911. I have tried it on a Sun, Vax 750, and Pyramid 90x.  It should
  912. also work properly on any SVR4.0 machine.  
  913.  
  914. The code is pretty heavily commented so it should be self
  915. explanatory.  
  916.  
  917. Note that you should put a -DFILENAME="your_home_dir/.plan"
  918. to get it to put your path in, or you can just edit the 
  919. source and change the value of FILENAME permanently.  
  920.  
  921. If you have any problems getting it compiled, just send me mail.
  922.  
  923. Enjoy.  
  924.  
  925. -Tony
  926.  
  927. @EOF
  928. set `sum $sumopt <README`; if test $1 -ne 65223
  929. then
  930.     echo ERROR: README checksum is $1 should be 65223
  931. fi
  932. set `wc -lwc <README`
  933. if test $1$2$3 != 1339725668
  934. then
  935.     echo ERROR: wc results of README are $* should be 133 972 5668
  936. fi
  937.  
  938. chmod 644 README
  939.  
  940. if test -f MANIFEST
  941. then
  942.     echo Ok to overwrite existing file MANIFEST\?
  943.     read answer
  944.     case "$answer" in
  945.     [yY]*)    echo Proceeding;;
  946.     *)    echo Aborting; exit 1;;
  947.     esac
  948.     rm -f MANIFEST
  949.     if test -f MANIFEST
  950.     then
  951.         echo Error: could not remove MANIFEST, aborting
  952.         exit 1
  953.     fi
  954. fi
  955. echo x - MANIFEST
  956. cat >MANIFEST <<'@EOF'
  957. MANIFEST - This file
  958. Makefile - The makefile
  959. README   - Original notes, notes for first set of changes, and notes
  960.        for my changes
  961. plan.c   - The program
  962. plan.nr  - A man page
  963. logfinger - a perl script included with the shar I got
  964. @EOF
  965. set `sum $sumopt <MANIFEST`; if test $1 -ne 19972
  966. then
  967.     echo ERROR: MANIFEST checksum is $1 should be 19972
  968. fi
  969. set `wc -lwc <MANIFEST`
  970. if test $1$2$3 != 743233
  971. then
  972.     echo ERROR: wc results of MANIFEST are $* should be 7 43 233
  973. fi
  974.  
  975. chmod 644 MANIFEST
  976.  
  977. if test -f Makefile
  978. then
  979.     echo Ok to overwrite existing file Makefile\?
  980.     read answer
  981.     case "$answer" in
  982.     [yY]*)    echo Proceeding;;
  983.     *)    echo Aborting; exit 1;;
  984.     esac
  985.     rm -f Makefile
  986.     if test -f Makefile
  987.     then
  988.         echo Error: could not remove Makefile, aborting
  989.         exit 1
  990.     fi
  991. fi
  992. echo x - Makefile
  993. cat >Makefile <<'@EOF'
  994. DEST          = /home/napalm/bin/fifo
  995.  
  996. EXTHDRS          = /usr/include/fcntl.h \
  997.         /usr/include/signal.h \
  998.         /usr/include/stdio.h \
  999.         /usr/include/sys/fcntl.h \
  1000.         /usr/include/sys/file.h \
  1001.         /usr/include/sys/stat.h \
  1002.         /usr/include/sys/sysmacros.h \
  1003.         /usr/include/sys/sysmacros.h \
  1004.         /usr/include/sys/types.h \
  1005.         /usr/include/sys/types.h
  1006.  
  1007. HDRS          =
  1008.  
  1009. LDFLAGS          =
  1010.  
  1011. LIBS          =
  1012.  
  1013. LINKER          = cc
  1014.  
  1015. MAKEFILE      = Makefile
  1016.  
  1017. OBJS          = plan.o
  1018.  
  1019. PRINT          = pr
  1020.  
  1021. PROGRAM          = plan
  1022.  
  1023. SRCS          = plan.c
  1024.  
  1025. all:        $(PROGRAM)
  1026.  
  1027. $(PROGRAM):     $(OBJS) $(LIBS)
  1028.         @echo -n "Loading $(PROGRAM) ... "
  1029.         @$(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
  1030.         @echo "done"
  1031.  
  1032. clean:;        @rm -f $(OBJS)
  1033.  
  1034. depend:;    @mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
  1035.  
  1036. index:;        @ctags -wx $(HDRS) $(SRCS)
  1037.  
  1038. install:    $(PROGRAM)
  1039.         @echo Installing $(PROGRAM) in $(DEST)
  1040.         @install -s $(PROGRAM) $(DEST)
  1041.  
  1042. print:;        @$(PRINT) $(HDRS) $(SRCS)
  1043.  
  1044. program:        $(PROGRAM)
  1045.  
  1046. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  1047.  
  1048. update:        $(DEST)/$(PROGRAM)
  1049.  
  1050. $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
  1051.         @make -f $(MAKEFILE) DEST=$(DEST) install
  1052. ###
  1053. plan.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h \
  1054.     /usr/include/sys/sysmacros.h /usr/include/sys/file.h \
  1055.     /usr/include/sys/fcntl.h /usr/include/sys/types.h \
  1056.     /usr/include/fcntl.h /usr/include/stdio.h /usr/include/sys/stat.h \
  1057.     /usr/include/signal.h
  1058. @EOF
  1059. set `sum $sumopt <Makefile`; if test $1 -ne 45642
  1060. then
  1061.     echo ERROR: Makefile checksum is $1 should be 45642
  1062. fi
  1063. set `wc -lwc <Makefile`
  1064. if test $1$2$3 != 641331401
  1065. then
  1066.     echo ERROR: wc results of Makefile are $* should be 64 133 1401
  1067. fi
  1068.  
  1069. chmod 644 Makefile
  1070.  
  1071. if test -f logfinger
  1072. then
  1073.     echo Ok to overwrite existing file logfinger\?
  1074.     read answer
  1075.     case "$answer" in
  1076.     [yY]*)    echo Proceeding;;
  1077.     *)    echo Aborting; exit 1;;
  1078.     esac
  1079.     rm -f logfinger
  1080.     if test -f logfinger
  1081.     then
  1082.         echo Error: could not remove logfinger, aborting
  1083.         exit 1
  1084.     fi
  1085. fi
  1086. echo x - logfinger
  1087. cat >logfinger <<'@EOF'
  1088. #!/usr/bin/perl -- # -*-Perl-*-
  1089.  
  1090. $me = "geoff";
  1091. $logfile = "/prod_10/geoff/.fingerees";
  1092. $pscommand = "ps -auw";
  1093.  
  1094. open(PS, "$pscommand |");
  1095. @fingers = grep(/(f\s+$me)|(finger\s+$me)/, <PS>);
  1096. close(PS);
  1097.  
  1098. ($num) = unpack("A9", `wc -l $logfile`); # =~ s/^\s*(\d+).*\n/\1/;
  1099. printf "I have been fingered %d time", $num;
  1100. print "s" if ($num - 1);
  1101. print " today\n";
  1102. close(STDOUT);
  1103.  
  1104. open(LOG, ">>$logfile");
  1105. foreach $line (@fingers) {
  1106.     ($user) = $line =~ /^\s*(\S+)/;
  1107.     print LOG "$user, at ", `date`;
  1108. }
  1109.  
  1110. print(LOG "somebody, at ", `date`) if (! ($#fingers + 1));
  1111. close(LOG);
  1112. @EOF
  1113. set `sum $sumopt <logfinger`; if test $1 -ne 41255
  1114. then
  1115.     echo ERROR: logfinger checksum is $1 should be 41255
  1116. fi
  1117. set `wc -lwc <logfinger`
  1118. if test $1$2$3 != 2478571
  1119. then
  1120.     echo ERROR: wc results of logfinger are $* should be 24 78 571
  1121. fi
  1122.  
  1123. chmod 755 logfinger
  1124.  
  1125. if test -f plan.c
  1126. then
  1127.     echo Ok to overwrite existing file plan.c\?
  1128.     read answer
  1129.     case "$answer" in
  1130.     [yY]*)    echo Proceeding;;
  1131.     *)    echo Aborting; exit 1;;
  1132.     esac
  1133.     rm -f plan.c
  1134.     if test -f plan.c
  1135.     then
  1136.         echo Error: could not remove plan.c, aborting
  1137.         exit 1
  1138.     fi
  1139. fi
  1140. echo x - plan.c
  1141. cat >plan.c <<'@EOF'
  1142.  
  1143. /*    THIS IS THE UNPUBLISHED SOURCE CODE OF REMBO        */
  1144. /*    The copyright notice above does not evidence any       */
  1145. /*    actual or intended publication of such source code.    */
  1146. /*    So, use it if you like, but give me credit.        */
  1147.  
  1148.  
  1149. /*     Usage: plan [-f file_name] program_name            */
  1150.  
  1151.  
  1152. /*    Description:                    */
  1153.  
  1154. /*     This program takes the full pathname of an    */
  1155. /*     executable and runs it on a fifo in the     */
  1156. /*    user's home directory named .plan.  This    */
  1157. /*     way, when finger is executed, the output    */
  1158. /*     of the program goes to the fifo.        */
  1159.     
  1160. /*    Written by:  Tony Rems                 */
  1161.  
  1162. /*     Send bugs and flames to /dev/null or         */
  1163. /*     rembo@unisoft.com                 */
  1164.  
  1165. /*    Modifications:                    */
  1166.  
  1167. /*    September 1991                    */
  1168. /*           (by Geoff Loker geoff@mdms.moore.com)    */
  1169. /*    Modified the program so that the path to the    */
  1170. /*    .plan file is not hardcoded in.  Now any number    */
  1171. /*    of users can use the program at the same time.    */
  1172. /*    I also modified the program to use an optional    */
  1173. /*    argument to specify which file to use.  The    */
  1174. /*    default file used is still the user's .plan,    */
  1175. /*    but this can now also be used to set up        */
  1176. /*    .signatures or any other file the user wants.    */
  1177.  
  1178. /*    Even more modifications                */
  1179.  
  1180. /*    January 1992                    */
  1181. /*          (by Karen Bruner napalm@ugcs.caltech.edu) */
  1182. /*    Added pid_deal function, so people can stick    */
  1183. /*     the program in their .login, and then have it    */
  1184. /*    killed by their .logout.  Program will not    */
  1185. /*    run if a .planpid file, the file with the PID    */
  1186. /*    for plan, already exists in the user's home    */
  1187. /*    directory.                    */
  1188.  
  1189. #include <sys/types.h>
  1190. #include <sys/file.h>
  1191. #include <stdio.h>
  1192. #include <fcntl.h>
  1193. #include <sys/stat.h>
  1194. #include <signal.h>
  1195. #include <string.h>
  1196.  
  1197. /* Defines */
  1198. #define PERMS 0666
  1199. #define USAGE "%s [-f file_name] program_name\n"
  1200.  
  1201. /* Function prototypes */
  1202. void sig_handler();
  1203. int pid_deal();    
  1204.  
  1205. main (argc, argv)
  1206. int argc;
  1207. char *argv[];
  1208. {
  1209.         int c, fflg;
  1210.     char *file;
  1211.         extern char *optarg;
  1212.     extern int optind;
  1213.     int fd;
  1214.     int pid;
  1215.     int status;
  1216.     char *getenv(), *home, plan[256], *strcat(), *strcpy();
  1217.     int pid_check;
  1218.     
  1219.     fflg = c = 0;
  1220.     while ((c = getopt(argc, argv, "f:")) != EOF) {
  1221.       file = optarg;
  1222.       fflg++;
  1223.     }
  1224.  
  1225. /* Comment out the next line if you don't want to have PID recorded
  1226.    to file .planpid */
  1227.  
  1228.     pid_check = pid_deal(); /* check for .planpid, if none, write
  1229.                    .planpid */
  1230.  
  1231. /* Uncomment next line if you commented out previous line */
  1232.  
  1233. /*  pid_check = 1; */
  1234.  
  1235.   if (pid_check == 1)  /* execute remaining part of program if .planpid
  1236.               does not exist, i.e., no other plan process is
  1237.               running */
  1238.     {
  1239.     if (fflg)
  1240.       strcpy(plan, file);
  1241.     else {
  1242.       home = getenv("HOME");
  1243.       strcpy(plan, home);
  1244.       strcat(plan, "/.plan");
  1245.     }
  1246. /*    setenv("PLAN", plan, 1); */
  1247.  
  1248.     if ( argc != optind + 1 ) {
  1249.         fprintf (stderr, USAGE, argv[0]);
  1250.         exit(1);
  1251.     }  /* if */
  1252.  
  1253. /* Catch interrupts for cleanup */
  1254.     signal(SIGTERM, sig_handler);
  1255.     signal(SIGINT, sig_handler);
  1256.     signal(SIGHUP, sig_handler);
  1257.  
  1258.     unlink (plan);
  1259.  
  1260. /* Make the fifo */
  1261.     if ((mknod(plan, S_IFIFO | PERMS, 0)) < 0 ) {
  1262.         perror("mknod");
  1263.         exit(2);
  1264.     }  /* if */
  1265.  
  1266.     while (1) {
  1267.         if ((fd = open(plan, O_WRONLY)) < 0 ) {
  1268.             perror("open");
  1269.             exit(3);
  1270.         } /* if */
  1271.  
  1272. /* Once our open completes we know that someone else has
  1273.  * opened the FIFO for reading, so we can know run our 
  1274.  * program on it.  So, we fork, exec our program and
  1275.  * wait for the child to complete.
  1276.  */
  1277.         switch (pid = fork()) {
  1278.             case -1:
  1279.                 perror("fork");
  1280.                 exit(4);
  1281.                 break;
  1282.             case 0:
  1283. /* If we're in the child, we copy our fifo to stdout */
  1284. /* and exec the program given */
  1285.                 dup2(fd, 1);
  1286.                 execlp(argv[optind],argv[optind],(void *)NULL);
  1287.                 perror("child returned");
  1288.                 exit(5);
  1289.                 break;
  1290.             default:
  1291. /* If we're in the parent, we close the pipe and wait */
  1292.                 close(fd);
  1293.                 while (wait(&status) != pid)
  1294.                     ;
  1295.                 break;
  1296.         } /* switch */
  1297.         sleep(2);
  1298.         close(fd);
  1299.     } /* while */
  1300.     }  /* end of my if (pid_check... */
  1301.  
  1302.   else
  1303.     printf("plan already running\n");
  1304.  
  1305. } /* main */
  1306.  
  1307. void sig_handler()  /* cleanup */
  1308. {
  1309.     char *plan, *getenv();
  1310.     
  1311.     plan = getenv("PLAN");
  1312.  
  1313.     unlink(plan);
  1314.     exit(0);
  1315. }
  1316.  
  1317. int pid_deal()    /* function for recording pid and making sure process
  1318.            isn't already running */
  1319. {
  1320.   char savepid[100];    /* string for file name */
  1321.   FILE *sp;
  1322.   int checker;        /* return value:  0 if .planpid exists, and
  1323.                program shouldn't be run, 1 if not */
  1324.   char *home;
  1325.  
  1326.   home = getenv("HOME");        /* put save name for file */
  1327.   strcpy(savepid, home);        /* in savepid */
  1328.   strcat(savepid, "/.planpid");
  1329.  
  1330.   if ((sp = fopen(savepid, "r")) != NULL) /* test for existence of 
  1331.                          .planpid by trying to open
  1332.                          the file for reading */
  1333.     checker = 0;     /* return a zero if read was successful, i.e.,
  1334.                file already exists */
  1335.     
  1336.   else
  1337.     checker = 1;    /* file doesn't exist, return a 1 to execute
  1338.                the rest of the program */
  1339.   fclose(sp);
  1340.  
  1341.   if (checker == 1)
  1342.     {
  1343.       sp = fopen(savepid, "w");
  1344.       fprintf(sp, "%d", getpid());     /* puts PID for plan into file */
  1345.       fclose(sp);
  1346.     }
  1347.  
  1348.   return checker;
  1349. @EOF
  1350. set `sum $sumopt <plan.c`; if test $1 -ne 51212
  1351. then
  1352.     echo ERROR: plan.c checksum is $1 should be 51212
  1353. fi
  1354. set `wc -lwc <plan.c`
  1355. if test $1$2$3 != 2088235034
  1356. then
  1357.     echo ERROR: wc results of plan.c are $* should be 208 823 5034
  1358. fi
  1359.  
  1360. chmod 644 plan.c
  1361.  
  1362. if test -f plan.nr
  1363. then
  1364.     echo Ok to overwrite existing file plan.nr\?
  1365.     read answer
  1366.     case "$answer" in
  1367.     [yY]*)    echo Proceeding;;
  1368.     *)    echo Aborting; exit 1;;
  1369.     esac
  1370.     rm -f plan.nr
  1371.     if test -f plan.nr
  1372.     then
  1373.         echo Error: could not remove plan.nr, aborting
  1374.         exit 1
  1375.     fi
  1376. fi
  1377. echo x - plan.nr
  1378. cat >plan.nr <<'@EOF'
  1379.  .TH PLAN L "\*(V)" "4BSD"
  1380.  .SH NAME
  1381. plan - run an executable when a specified FIFO is opened
  1382.  .SH SYNOPSIS
  1383.  .B plan
  1384. [
  1385.  .BR -f file
  1386. ]
  1387.  .B executable
  1388.  .SH DESCRIPTION
  1389.  .I plan
  1390. takes the name of an executable program and runs it on a FIFO that
  1391. is specified on the command line or on a FIFO in the user's home directory
  1392. named .plan.  Whenever the FIFO is accessed, the output of the executable
  1393. program goes to the FIFO.  It also writes the PID of plan to a file, so
  1394. the process can be killed during logout, and it checks for the existence
  1395. of this file to make sure plan isn't already running.
  1396.  .SH OPTIONS
  1397.  .TP
  1398.  .B \-f file_name
  1399. The \fB\-f flag causes \fIplan\fR to set up the specified \fBfile_name\fR
  1400. as a FIFO rather than the default \fB$HOME/.plan\fR.
  1401.  .PP
  1402. Some sample uses of \fIplan\fR would be:
  1403.  .TP
  1404.  .B plan /usr/games/fortune &
  1405. This will display a randomly selected fortune as the contents of
  1406. your .plan file whenever you are fingered.
  1407.  .TP
  1408.  .B plan -f ~/.signature ~/bin/gensig &
  1409. This will run the program gensig whenever your .signature file is accessed,
  1410. allowing you to change your .signature whenever you post.
  1411.  .TP
  1412.  .B plan ~/bin/logfinger &
  1413. This will run the program logfinger whenever your .plan file is accessed,
  1414. and you can log all instances of people fingering you.
  1415.  .SH AUTHOR
  1416. Tony Rems (rembo@unisoft.com)
  1417.  .PP
  1418. Modifications by Geoff Loker (geoff@mdms.moore.com)
  1419. More modifications by Karen Bruner (napalm@ugcs.caltech.edu)
  1420.  .SH BUGS
  1421. Your system must support named pipes in order for this to work.
  1422. @EOF
  1423. set `sum $sumopt <plan.nr`; if test $1 -ne 57204
  1424. then
  1425.     echo ERROR: plan.nr checksum is $1 should be 57204
  1426. fi
  1427. set `wc -lwc <plan.nr`
  1428. if test $1$2$3 != 432551495
  1429. then
  1430.     echo ERROR: wc results of plan.nr are $* should be 43 255 1495
  1431. fi
  1432.  
  1433. chmod 644 plan.nr
  1434.  
  1435. exit 0
  1436. --
  1437.  
  1438. Wed Jan 15 12:50:58 PST 1992
  1439.  
  1440. Thirty-two footsteps leading to the room where the paint doesn't wanna dry.
  1441.  
  1442.  
  1443. -- 
  1444. aasdSteveFranklin-Subliminal Psychology Major.ks;dlasBlueJaysRULEkasdfeahsdbfl
  1445. sd;lfaswoq[eBuyMeAQuadra!!!mbnZMXCNdfsba;KdSPAMiuroqiyetIBMSuxiweuryth'ewr;mxn
  1446. qpuepriuPartyOneqtuj;,n.,xnc,kjasFlameMeNot!;lkj;lkgkjd;askElvisLivesjhfquweru
  1447. zx.cfranklin@ug.cs.dal.ca,sk;t;lrut[Superboy@ac.dal.cav.zx,Physics!eq3rwkh;oHA
  1448.  
  1449. -----------------------------
  1450.  
  1451. From: MIGUEL BRAXTON FARAH <mbfarah@isluga.puc.cl>
  1452. Subject: Serious question - please read
  1453. Date: 10 Nov 92 15:27:03 GMT
  1454. Sender: News Manager <news@tolten.puc.cl>
  1455. X-Newsreader: Tin 1.1 PL5
  1456. To:       info-unix@sem.brl.mil
  1457.  
  1458. Hi! I'd like to make a serious question:
  1459.  
  1460. some days ago, in my account appeared a directory called "??????" - and I
  1461. wasn't the owner. It was protected so I couldn't even erase it. Using
  1462. the quota command I determined that it had about 300Kb of things that were
  1463. occupying my disk space - I could not get rid of them. Three days after 
  1464. that, the directory disappeared (obviously, the owner erased it). My
  1465. question is: how can I access to such a directory? I know now that one
  1466. should protect his home directory - but if it happens again (I suspect
  1467. of an administrator), how will I be able to take measures about it?
  1468.  
  1469. BTW, I'm using ULTRIX-32.
  1470. The "cd ??????" responded "ambiguous command".
  1471. I'm using Cshell.
  1472.  
  1473. Thank you in advance.
  1474.  
  1475. --
  1476. MIGUEL FARAH F.         |          (__)   "I like EBCDIC."     | Yjod od sm
  1477. mbfarah@isluga.puc.cl   |          (oo)  /                     | rmvtuqyrf
  1478.                         |   /-------\/      "I do too."        | zrddshr.
  1479. #include <disclaimer.h> |  / |     ||                  \  (__) | Vtsvl oy smf
  1480. #include <flames.h>     | *  ||W---||                     oo ) | upi eoaa eom
  1481. #include <signature.h>  |    ||    ||                     |_/\ | noh qtovrd.
  1482.  
  1483. -----------------------------
  1484.  
  1485. From: Thom Anthony McCarty <IETAM@asuacad.bitnet>
  1486. Subject: cron not finding script
  1487. Date: 10 Nov 92 17:28:34 GMT
  1488. To:       info-unix@sem.brl.mil
  1489.  
  1490.  
  1491. I am executing a Bourne shell script, newsrunning, from within cron.
  1492. I have given the absolute filename (including the path) but cron says
  1493. it cannot find the script:
  1494.  
  1495.  
  1496. helpdesk% crontab -l
  1497. 5,10,20,25,35,40,50,55 * 1-31 * 1-6 '/usr/lib/newsbin/input/newsrun'
  1498. 30 8    1-31 *  1-5     '/usr/lib/newsbin/input/newsrunning off'
  1499. 00 17   1-31 *  1-5     '/usr/lib/newsbin/input/newsrunning on'
  1500. #40 *    1-31 *  0-6     '/usr/lib/newsbin/batch/sendbatches'
  1501. 59 0    1-31 *  0-6     '/usr/lib/newsbin/expire/doexpire'
  1502. 10 8    1-31 *  0-6     '/usr/lib/newsbin/maint/newsdaily'
  1503. 00 5,13,21      1-31 *  1-5     '/usr/lib/newsbin/maint/newswatch
  1504. | mail page'
  1505. 1,31 *   1-31 *  1-5     '/usr/lib/newsbin/utils/create-desc'
  1506.  
  1507.  
  1508. Although the script works from when I'm logged on the "news" account,
  1509. I get the following mail when cron attempts to run the script:
  1510.  
  1511.  
  1512. From daemon Tue Nov 10 08:30:02 1992
  1513. Return-Path: <root>
  1514. Received: by helpdesk.inre.asu.edu (4.1/SMI-4.1)
  1515.         id AA09380; Tue, 10 Nov 92 08:30:02 MST
  1516. Date: Tue, 10 Nov 92 08:30:02 MST
  1517. From: root (Operator)
  1518. Message-Id: <9211101530.AA09380@helpdesk.inre.asu.edu>
  1519. To: news
  1520. Subject: Output from "cron" command
  1521. Status: R
  1522.  
  1523. Your "cron" job
  1524.  
  1525.     '/usr/lib/newsbin/input/newsrunning off'
  1526.  
  1527. produced the following output:
  1528.  
  1529. sh: /usr/lib/newsbin/input/newsrunning off: not found
  1530.  
  1531.  
  1532. And here's the kicker; I have given an absolute filename and cron
  1533. cannot find it:
  1534.  
  1535.  
  1536. helpdesk% ls -al /usr/lib/newsbin/input
  1537. total 144
  1538. drwxrwsr-x  2 news          512 Oct 29 10:53 .
  1539. drwxrwsr-x 10 news          512 Nov  5 10:08 ..
  1540. -rwxrwxr-x  1 news        24576 Sep 23 08:55 bdecode
  1541. -rwxrwxr-x  1 news        24576 Sep 23 08:55 c7decode
  1542. -rwx--x--x  1 news         1499 Sep 23 08:55 cunbatch
  1543. -rw-------  1 root        51740 Oct  7 10:32 mail.man
  1544. -rwxr-xr-x  1 news         3693 Nov  2 13:03 newsrun
  1545. -rwxr-xr-x  1 news          510 Sep 23 08:55 newsrunning
  1546. -rwsrwsr-x  1 news        32768 Sep 23 08:55 newsspool
  1547. -rwx--x--x  1 news          239 Sep 23 08:55 recenews
  1548. -rwx--x--x  1 news          279 Sep 23 08:55 recpnews
  1549. -rwx--x--x  1 news         1499 Sep 23 08:55 rnews
  1550.  
  1551. Any words of wisdom (or even plain and simple guesses) would be
  1552. greatly appreciated.
  1553.  
  1554. -----------------------------
  1555.  
  1556. From: Henry Spencer <henry@zoo.toronto.edu>
  1557. Subject: Re: cron not finding script
  1558. Date: 12 Nov 92 17:29:17 GMT
  1559. To:       info-unix@sem.brl.mil
  1560.  
  1561. In article <92315.102834IETAM@ASUACAD.BITNET> Thom Anthony McCarty <IETAM@ASUACAD.BITNET> writes:
  1562. >30 8    1-31 *  1-5     '/usr/lib/newsbin/input/newsrunning off'
  1563. > ...
  1564. >Your "cron" job
  1565. >
  1566. >    '/usr/lib/newsbin/input/newsrunning off'
  1567. >
  1568. >produced the following output:
  1569. >
  1570. >sh: /usr/lib/newsbin/input/newsrunning off: not found
  1571.  
  1572. Get rid of the quotes.  The shell is looking for a command named
  1573. "/usr/lib/newsbin/input/newsrunning off", and there is no such command.
  1574. There is a command "/usr/lib/newsbin/input/newsrunning", but that's not
  1575. what your cron is looking for, because those quotes make the command all
  1576. one word.
  1577. -- 
  1578. MS-DOS is the OS/360 of the 1980s.      | Henry Spencer @ U of Toronto Zoology
  1579.               -Hal W. Hardenbergh (1985)|  henry@zoo.toronto.edu  utzoo!henry
  1580.  
  1581. -----------------------------
  1582.  
  1583. From: Spencer Greene <sgreene@nimbus.com>
  1584. Subject: PRINTCAP needed
  1585. Date: 11 Nov 92 07:05:48 GMT
  1586. Sender: Spencer Greene <sgreene@nimbus.com>
  1587. To:       info-unix@sem.brl.mil
  1588.  
  1589. OK, I've checked the comp.unix.questions faq, and searched through
  1590. comp.unix.admin, but I can't find any reference to what I thought
  1591. would be an obvious question: where can I get a "monster" printcap
  1592. file that will include entries for any printer my users may think
  1593. to connect and ask me for help with?
  1594.  
  1595. I'm *sure* this is in an faq somewhere, & I'm just looking in the
  1596. wrong place, so will someone please enlighten me?
  1597.  
  1598. thx,
  1599. -- 
  1600. - Spencer Greene                                          +1 408 727 5445 -
  1601. - Nimbus Technology Inc.                               sgreene@nimbus.com -
  1602. - Santa Clara, California USA            {sgiblab,ub-gate}!c2tech!sgreene -
  1603. - "Patriotism is the last refuge of a scoundrel."    --Dr. Samuel Johnson -
  1604.  
  1605. -----------------------------
  1606.  
  1607. From: Martin Berli <berli@chx400.switch.ch>
  1608. Subject: Change Modification Date of Symbolic Link
  1609. Date: 11 Nov 92 08:36:28 GMT
  1610. To:       info-unix@sem.brl.mil
  1611.  
  1612. Is there a way to change the modification date of a symbolic
  1613. link? I would like to set it to the same date as the file it's
  1614. pointing to.
  1615.  
  1616.  -- Martin Berli
  1617.  
  1618.  ------------------------------------------------------------------------
  1619. Internet: berli@switch.ch  | SWITCH, Swiss Academic and Research Network
  1620. Phone   : +41 1 261 8178   | Limmatquai 138, CH-8001 Zurich
  1621.  
  1622. -----------------------------
  1623.  
  1624. From: Brian Day <bday@lambda.msfc.nasa.gov>
  1625. Subject: Reliable signals in Unix ?
  1626. Keywords: signal
  1627. Date: 11 Nov 92 16:36:24 GMT
  1628. To:       info-unix@sem.brl.mil
  1629.  
  1630. OK, time for a question from the brain-dead.
  1631.  
  1632. I have two Unix processes: one sends a burst of signals to the
  1633. other.  The receiving process misses several of these signals -
  1634. i.e.  they don't get 'queued up'.
  1635.  
  1636. I know I could set up a kluge with a semaphore to act as an up-down
  1637. counter, but I was hoping for a more elegant solution.  This is
  1638. on a Sparcstation 4 running SunOS 4.1.1.
  1639.  
  1640. Any suggestions ?
  1641.  
  1642. Many thanks,
  1643.  
  1644. bd
  1645.  
  1646.  
  1647. -- 
  1648. Brian Day                                       bday@lambda.msfc.nasa.gov
  1649. New Technology, Inc.                            (205) 461-4584
  1650. Mission Operations Support Systems              Opinions are my own -
  1651. Marshall Space Flight Center, Huntspatch, AL    May be fatal if swallowed
  1652.  
  1653. -----------------------------
  1654.  
  1655. From: steve scrivano <sscrivan@nyx.cs.du.edu>
  1656. Subject: Running "dd" from .profile
  1657. Keywords: dd .profile
  1658. Date: 11 Nov 92 17:29:27 GMT
  1659. Sender: netnews admin account <usenet@mnemosyne.cs.du.edu>
  1660. To:       info-unix@sem.brl.mil
  1661.  
  1662. Can anyone tell me how to write a script that could be placed in the user's
  1663.  .profile file that would check which /dev/tty port I am logged into and pass
  1664. that variable to a "dd" command line that is placed in the .profile file which
  1665. would then execute upon login.  Example .profile entries:
  1666.  
  1667. script to check for login terminal variable
  1668. dd if=file of=/dev/ttyvariable
  1669.  
  1670. Steve Scrivano
  1671. sscrivan@nyx.cs.du.edu
  1672.  
  1673. -----------------------------
  1674.  
  1675. From: Martin McCormick <martin@datacomm.ucc.okstate.edu>
  1676. Subject: Re: Running "dd" from .profile
  1677. Keywords: dd .profile
  1678. Date: 11 Nov 92 22:10:45 GMT
  1679. Sender: USENET News System <news@osuunx.ucc.okstate.edu>
  1680. Nntp-Posting-Host: datacomm.ucc.okstate.edu
  1681. To:       info-unix@sem.brl.mil
  1682.  
  1683. In article <1992Nov11.172927.6700@mnemosyne.cs.du.edu> sscrivan@nyx.cs.du.edu (steve scrivano) writes:
  1684. >Can anyone tell me how to write a script that could be placed in the user's
  1685. >.profile file that would check which /dev/tty port I am logged into and pass
  1686. >that variable to a "dd" command line that is placed in the .profile file which
  1687. >would then execute upon login.
  1688.  
  1689. If you want to keep things simple, you might pipe the output of the "who"
  1690. command through awk or nawk and locate the user by matching all of the
  1691. output lines with the "whoami" variable.  I am leaving this as an exercise
  1692. for the user, because there are a couple of nasty little problems which will
  1693. need attention before the script is bullet-proof.  You will need to resolve
  1694. what to do with a user who is already logged in to 15 or 16 other sessions
  1695. and has just logged in, again.
  1696.     Also, it would be helpful, later, to have this script as a separate
  1697. shell script so that it can be better understood, two years later, when
  1698. it needs modification.  Good luck.
  1699.  
  1700. Martin McCormick WB5AGZ   Stillwater, OK
  1701. O.S.U. Computer Center Data Communications Group
  1702.  
  1703. -----------------------------
  1704.  
  1705. From: Robert Earl <chupchup@ferkel.ucsb.edu>
  1706. Subject: Re: Running "dd" from .profile
  1707. Keywords: dd .profile
  1708. Date: 12 Nov 92 09:38:00 GMT
  1709. To:       info-unix@sem.brl.mil
  1710.  
  1711. sscrivan@nyx.cs.du.edu (steve scrivano) writes:
  1712.  
  1713. | Can anyone tell me how to write a script that could be placed in the user's
  1714. | .profile file that would check which /dev/tty port I am logged into and pass
  1715. | that variable to a "dd" command line that is placed in the .profile file which
  1716. | would then execute upon login.  Example .profile entries:
  1717.  
  1718. | script to check for login terminal variable
  1719. | dd if=file of=/dev/ttyvariable
  1720.  
  1721. what about
  1722.  
  1723.     dd if=file of=`tty`
  1724.  
  1725. or the ever-popular:
  1726.  
  1727.     cat file
  1728.  
  1729. -- 
  1730. robert earl          |
  1731. rearl@ucsd.edu       | "I got a bottle of tequila, baby, who needs friends?"
  1732. rearl@piggy.ucsb.edu |   --Johnette Napolitano, Concrete Blonde
  1733.  
  1734. -----------------------------
  1735.  
  1736. From: Ron Cecchini <cecchinr@gehrig.cs.rpi.edu>
  1737. Subject: Proper way to read/write a struct from/to a socket
  1738. Date: 11 Nov 92 17:39:55 GMT
  1739. Nntp-Posting-Host: gehrig.cs.rpi.edu
  1740. To:       info-unix@sem.brl.mil
  1741.  
  1742. Hi all,
  1743.  
  1744. o read()/write() expect you to read/write a "char *buf"
  1745. o I have a variable "foo" which is of type "struct foo_type"
  1746. o I've been reading/writing "(char *)&foo"
  1747.  
  1748. It seems to be working.  Am I just lucky, or is this correct?
  1749. I've never tried reading into a structure like this before...
  1750.  
  1751. Ron
  1752.  
  1753. -----------------------------
  1754.  
  1755. From: Kartik Subbarao <subbarao@fc.hp.com>
  1756. Subject: Re: Proper way to read/write a struct from/to a socket
  1757. Date: 12 Nov 92 15:11:14 GMT
  1758. Sender: USENET News System <news@princeton.edu>
  1759. Nntp-Posting-Host: tex.princeton.edu
  1760. To:       info-unix@sem.brl.mil
  1761.  
  1762. In article <60p137_@rpi.edu> cecchinr@gehrig.cs.rpi.edu (Ron Cecchini) writes:
  1763. >Hi all,
  1764. >
  1765. >o read()/write() expect you to read/write a "char *buf"
  1766. >o I have a variable "foo" which is of type "struct foo_type"
  1767. >o I've been reading/writing "(char *)&foo"
  1768. >
  1769. >It seems to be working.  Am I just lucky, or is this correct?
  1770. >I've never tried reading into a structure like this before...
  1771.  
  1772. Sure, it's fine. Think about it. The read() and write() calls transfer
  1773. some bytes from where you tell it to start. C stores the elements 
  1774. in a struct contiguously in memory, so when you give the address of the struct
  1775. as the starting address, then say sizeof struct for the number of bytes to
  1776. be sent, and assuming the other end has the same byte-ordering scheme, then
  1777. you can read it right into another struct.
  1778.  
  1779.     -Kartik
  1780.  
  1781. -----------------------------
  1782.  
  1783. From: hong vuong <cam@ucrengr.ucr.edu>
  1784. Subject: Need help with 'tar' command.
  1785. Date: 11 Nov 92 18:19:50 GMT
  1786. Sender: news@galaxy.ucr.edu
  1787. Nntp-Posting-Host: ucrengr
  1788. To:       info-unix@sem.brl.mil
  1789.  
  1790. I am having a problem with the 'tar' command.  We archived some
  1791. directories,  tar cvf /dev/rst0 dir1 dir2.  But now that we are
  1792. trying to read it back,  tar xvf /dev/rst0, we got the following
  1793. error message:
  1794.  
  1795. tar: read error: I/O error
  1796. st0:   Error for command 'read', Error Level: 'Fatal'
  1797.        Block: 33620      File Number: 0
  1798.        Sense key:  Media Error
  1799.  
  1800. Is there a way to skip over this error and continuing on reading?
  1801. Please help.  My e-mail is cam@ucrengr.ucr.edu.  Thank in advance.
  1802.  
  1803. Mike.
  1804.  
  1805. -----------------------------
  1806.  
  1807. From: michael <puchalek@skynyrd.rutgers.edu>
  1808. Subject: 2nd time:How to remove files?
  1809. Keywords: remove, unix, corefiles
  1810. Date: 11 Nov 92 18:41:21 GMT
  1811. Followup-To: comp.unix.questions
  1812. To:       info-unix@sem.brl.mil
  1813.  
  1814.  
  1815.     I posted this article in comp.unix.questions with a narrow
  1816. distribution, so I am reposting with a wider range. If you see it
  1817. twice, sorry.
  1818.  
  1819. I keep getting files added to my working directory such as 'xerrors'
  1820. and '.nfs***'. If I put a line in my .login that says 'rm xerrors', a
  1821. 'xerrors:no such file' message appears every time I log in. If I leave
  1822. the 'rm xerrors' line out of my .login, the 'xerrors' file starts to
  1823. show up in my root directory.  The '.nfs***' files appear whenever I
  1824. am working in the text editor, emacs in this case. I have uncommented 
  1825. the line 'limit coredumpsize 0' in my .login.  Any suggestions? If it is 
  1826. more convenient to email, that's fine.
  1827.  
  1828.         Thanks,
  1829.             Mike Puchalek
  1830.  
  1831. -----------------------------
  1832.  
  1833. From: Josef Moellers <mollers.pad@sni.de>
  1834. Subject: Re: 2nd time:How to remove files?
  1835. Keywords: remove, unix, corefiles
  1836. Date: 12 Nov 92 15:46:48 GMT
  1837. Sender: josef@uranium.sto.pdb.sni.de
  1838. NNTP-Posting-Host: uranium.sto.pdb.sni.de
  1839. To:       info-unix@sem.brl.mil
  1840.  
  1841. In <Nov.11.13.41.20.1992.909@skynyrd.rutgers.edu> puchalek@skynyrd.rutgers.edu (michael) writes:
  1842.  
  1843.  
  1844. >    I posted this article in comp.unix.questions with a narrow
  1845. >distribution, so I am reposting with a wider range. If you see it
  1846. >twice, sorry.
  1847.  
  1848. >I keep getting files added to my working directory such as 'xerrors'
  1849. >and '.nfs***'. If I put a line in my .login that says 'rm xerrors', a
  1850. >'xerrors:no such file' message appears every time I log in. If I leave
  1851. >the 'rm xerrors' line out of my .login, the 'xerrors' file starts to
  1852. >show up in my root directory.  The '.nfs***' files appear whenever I
  1853. >am working in the text editor, emacs in this case. I have uncommented 
  1854. >the line 'limit coredumpsize 0' in my .login.  Any suggestions? If it is 
  1855. >more convenient to email, that's fine.
  1856.  
  1857. I can't say anything about "xerrors", but as far as ".nfs***" is
  1858. concerned:
  1859. NFS is a stateless system. That means that neither the server, nor the
  1860. client can assume anything about the state of the other side.
  1861.  
  1862. One of the things the server is not allowed to know is the idea of "open
  1863. files" on the client's side. Therefore, whenever the client opens a file
  1864. on an NFS-mounted file system, and subsequently unlinks the file
  1865. _before_ closing it, the client cannot completely remove the entry from
  1866. the directory, as this might be the last reference to the file and the
  1867. server (who doesn't know the file is still open on the client's side)
  1868. will remove the file, freeing all disk blocks that are/were allocated to
  1869. the file. UNIX's notion is, however, that the file remains on disk
  1870. _until the file is closed for the last time_, i.e. until either the
  1871. process closes the file or the process dies (closing the file
  1872. implicitly).
  1873. In order to allow the file to remain open and still "free" the directory
  1874. entry (or at least allow the file's name to be re-used), the NFS client
  1875. silently renames the file to ".nfs<number>", where <number> is generated
  1876. automagically. When the process closes the file, the NFS client software
  1877. will detect this and send an "unlink" command to the server which will
  1878. then _really_ remove the file and free up all disk space.
  1879.  
  1880. This will also pop up when You "open" the last file in a directory, then
  1881. "unlink" it and then try to "rmdir" the directory it is in.
  1882. Under S5 or UFS file systems, this works OK: the directory is gone.
  1883. Under NFS, You'll get a "directory not empty" error, and when You look:
  1884. voila! It's empty! B-{)
  1885.  
  1886. Does this make sense to You?
  1887.  
  1888. I assume that "xerrors" is created by some X-windows product and removed
  1889. whenever the product terminates. So, why worry?
  1890. -- 
  1891. | Josef Moellers        | c/o Siemens Nixdorf Informationssysteme AG  |
  1892. |  USA: mollers.pad@sni-usa.com    | Abt. STO-XS 113       | Riemekestrasse   |
  1893. | !USA: mollers.pad@sni.de    | Phone: (+49) 5251 835124 | D-4790 Paderborn |
  1894.  
  1895. -----------------------------
  1896.  
  1897. From: MARK GUM <mgum@oavax.csuchico.edu>
  1898. Subject: Ride-Share Software
  1899. Date: 11 Nov 92 19:18:34 GMT
  1900. NNTP-Posting-Host: oavax.csuchico.edu
  1901. To:       info-unix@sem.brl.mil
  1902.  
  1903. Has anyone heard of a Ride-Share software package that runs on xenix?  If
  1904. you have any information to share on this please E-Mail to
  1905. MGUM@OAVAX.CSUCHICO.EDU
  1906. Thanks.
  1907.  
  1908. **********************************************************
  1909. MARK GUM, CALIFORNIA STATE UNIVERSITY, CHICO
  1910. MGUM@OAVAX.CSUCHICO.EDU
  1911.  
  1912. -----------------------------
  1913.  
  1914. From: Frank Pinto <rolls@cis.umassd.edu>
  1915. Subject: Need help with "MAKEFILE"
  1916. Date: 11 Nov 92 19:54:27 GMT
  1917. Sender: USENET News System <usenet@umassd.edu>
  1918. To:       info-unix@sem.brl.mil
  1919.  
  1920. Hello all
  1921.  
  1922. I'm new in the subject, therefore here it goes:
  1923. I've just 'ftp' some files from "digital", uncompressed
  1924. them, unarchived them, 
  1925. and found out that there are about 20 files all together,
  1926. now i want to compile them bu i'm sopposed to 
  1927. ??????  Makefile ?????? them. 
  1928. Is this some sort of arrengement I must performe in 
  1929. a certain order to have the program compiled?
  1930. I have no manuals (I'm home)
  1931. and one person which could help me is in Jury Duty.
  1932.  
  1933. thanks in  advance
  1934.  
  1935. Frank Pinto
  1936.  
  1937. -----------------------------
  1938.  
  1939. From: HOSSEIN <hossein@ces.cwru.edu>
  1940. Subject: MAXOptics Earasble optical drive
  1941. Keywords: optical drive sco
  1942. Date: 11 Nov 92 20:32:05 GMT
  1943. Expires: Dec. 1, 1992
  1944. Sender: hossein@alpha.ces.cwru.edu
  1945. NNTP-Posting-Host: ida.ces.cwru.edu
  1946. To:       info-unix@sem.brl.mil
  1947.  
  1948. Hi there,
  1949.     We have a 486/33 running under SCO unix 3.2v4.0.  We are thinking of 
  1950. adding an earasble optical drive to our system.  Does anybody have any 
  1951. experience with Maxtor's MAXOptics earasable optical drive? 
  1952. Is it supported under SCO unix 3.2v4.0?
  1953. Any other brand which is tested?
  1954.  
  1955. Any help is greatly appreciated( Please respond through Email),
  1956. Seyed.
  1957.  
  1958. -----------------------------
  1959.  
  1960. From: Jon Beck <beck@a.cs.wvu.wvnet.edu>
  1961. Subject: creeping featurism reference
  1962. Date: 11 Nov 92 20:37:32 GMT
  1963. Sender: news@cs.wvu.wvnet.edu
  1964. To:       info-unix@sem.brl.mil
  1965.  
  1966. Can anyone give me a reference for the first use of this term to
  1967. describe unix programs? ("I've already forgotten more than you ever
  1968. knew..." Good grief, now I've forgotten who wrote *that*. Dylan?)
  1969.  
  1970. Thanks.
  1971. -- 
  1972. Jon Beck, SoRReL Project GRA
  1973. West Virginia University, Stat & CS
  1974. beck@cs.wvu.wvnet.edu
  1975.  
  1976. -----------------------------
  1977.  
  1978. From: Eric Tse <tse@leland.stanford.edu>
  1979. Subject: How do I make dynamic link libraries?
  1980. Date: 11 Nov 92 20:52:17 GMT
  1981. Sender: Mr News <news@leland.stanford.edu>
  1982. X-Newsreader: Tin 1.1 PL5
  1983. To:       info-unix@sem.brl.mil
  1984.  
  1985. Hi,
  1986.     I am new to dynamic-link libraries and wonder how I can 
  1987. create one. For example, if I want to make f1.o f2.o into a 
  1988. libtest.so.0.1, do I do:
  1989.     ld -Bdynamic f1.o f2.o -o libtest.so.0.1
  1990. ?
  1991.     Then if I want to compile a programm a.out originally
  1992. using f1.o and f2.o, do I do:
  1993.     cc -Bdynamic -o a.out other1.o other2.o libtest.so.0.1
  1994. ?
  1995.     If I want to execute a.out, do I have to
  1996.     setenv LD_LIBRARY_PATH /path_of_the_so
  1997. before I run a.out?
  1998.  
  1999. But it does not work! Any help? Please?
  2000.  
  2001. --
  2002. ========================================================================
  2003. Eric Tse
  2004. tse@leland.stanford.edu
  2005. ========================================================================
  2006.  
  2007. -----------------------------
  2008.  
  2009. From: Paul Prescod <papresco@napier.uwaterloo.ca>
  2010. Subject: Re: IS UNIX DEAD (long)
  2011. Date: 11 Nov 92 20:56:17 GMT
  2012. Sender: news@undergrad.math.waterloo.edu
  2013. To:       info-unix@sem.brl.mil
  2014.  
  2015. >>As far as OS/2 (and AmigaDOS, BTW) goes, only one file matching the
  2016. >>pattern (unix parlance) [Mm][Yy][Ff][Ii][Ll][Ee] can exist in a
  2017. >>directory.
  2018. >
  2019. >Geez, I can't count how often I saved a version of a file by typing
  2020. >    mv Driver.o Driver.O
  2021. >    mv source.c source.C
  2022.  
  2023. And what's so evil about Driver.bak, or driver.1,driver.2.  There are
  2024. 100 ways to differentiate two files with close names, case sensitivity 
  2025. is only one.
  2026.  
  2027. >My 2ct:
  2028. >UNIX doesn't have these "user friendlyness" of DOS, because it isn't DOS
  2029. >that's user friendly, it's the applications that were written for it.
  2030. >One OS is no more "user friendly" than the other.
  2031. >
  2032. True, the problem is there are people, in this very newsgroup, who see
  2033. no reason to try to make user friendly applications for unix.  To them,
  2034. if you can't use VI right off the bat, or enjoy learning obscure, 
  2035. nonsensical, illogical keystrokes, you should go back to the mac.
  2036. THIS will kill Unix.
  2037.  
  2038. If people like you say: Let's see how we can 'layer' this ugly operating 
  2039. system with nice applications, shells and help functions.
  2040.  
  2041. BTW, while I maintain that comparing unix to DOS is useless, DOS does
  2042. come with a quite user friendly (though poor for power-users) shell.
  2043.  
  2044. I have set up that shell many, many times, and people who couldn't
  2045. copy a file suddenly can back up their systems, copy, move, delete 
  2046. and edit.  I, for one, hate the thing.  But I recognize it's value to
  2047. new users.  Unix could do the same thing.  Probably someone has written
  2048. it.
  2049.  
  2050. -----------------------------
  2051.  
  2052. From: nseth@desire.wright.edu
  2053. Subject: Mail - signature files.
  2054. Date: 11 Nov 92 21:16:10 GMT
  2055. To:       info-unix@sem.brl.mil
  2056.  
  2057. Is there a way that you can have your signature file automatically appended
  2058. to all your mail messages.
  2059.  
  2060.  
  2061. Thanks
  2062. Nitin Seth
  2063. nseth@cs.wright.edu
  2064.  
  2065. -----------------------------
  2066.  
  2067. From: Brett Lymn <blymn@awadi.com.au>
  2068. Subject: Re: Does anyone have any good insulting acronyms for VMS?
  2069. Date: 11 Nov 92 22:30:08 GMT
  2070. NNTP-Posting-Host: coolibah.awadi.com.au
  2071. To:       info-unix@sem.brl.mil
  2072.  
  2073. >>>>> On 7 Nov 92 06:49:22 GMT, mark@coombs.anu.edu.au (Mark) said:
  2074. Mark> NNTP-Posting-Host: 150.203.76.2
  2075. Mark> Organisation: Wassat?!
  2076.  
  2077. Mark> haley@husc11.harvard.edu (Elizabeth Haley) writes:
  2078.  
  2079. >Verifiablely Maniacal System
  2080. >Viciously Mangled System
  2081. >Vogon Made System
  2082. >Vacuous; moreover, stupid.
  2083. >Vaxes mostly Suck.
  2084.  
  2085. Mark> Said with a european accent:
  2086. Mark> Ve Make Shit
  2087.  
  2088. Mark> Vulgar Madman Society
  2089. Mark> Virgin Mind Screwer
  2090. Mark> Valium Mandatory System
  2091. Mark> Viscuous Menstral Slop
  2092. Mark> Violent Miscarriage Starter
  2093. Mark> Viable Monday Symbol
  2094. Mark> Very Moronic Setup
  2095.  
  2096. My favourite (from someone in GNU I think):
  2097.  
  2098. Vomit Making System
  2099.  
  2100.  
  2101. --
  2102. Brett Lymn
  2103.  
  2104. -----------------------------
  2105.  
  2106. From: "John N. Stewart" <jns@ace.nas.nasa.gov>
  2107. Subject: Re: Bourne Shell Programming Considered Harmful
  2108. Date: 11 Nov 92 23:20:31 GMT
  2109. Sender: News Administrator <news@nas.nasa.gov>
  2110. To:       info-unix@sem.brl.mil
  2111.  
  2112. In article <1992Nov5.225431*Harald.Eikrem@delab.sintef.no> Harald.Eikrem@delab.sintef.no writes:
  2113. >While I cannot say that I entirely enjoy the freehand Perl style, I
  2114. >certainly agree that it takes something more than basic *sh languages
  2115. >as we've gotten to know them to do "real" programming.  But since you
  2116. >mention Makefiles, some of the toughest programming tasks I've ever been
  2117. >through has actually been planting and maintaining pieces of Bourne shell
  2118. >language into ravel Make configs.
  2119. >
  2120. >Which really suggests that if someone could come up with a Perl based
  2121. >alternative to Make which could understand Perl language itself, the
  2122. >programming world should do little but rejoice.
  2123.  
  2124.  
  2125. This is a plug :) At LISA VI down in Long Beach, a group of us got
  2126. together (thanx to Paul Anderson) and started discussing software
  2127. configuration and installation issues. An email list formed, and was
  2128. announced over the "net" a couple of weeks back. If you are
  2129. interested, I attached information on how to subscribe.
  2130.  
  2131.  
  2132. --Ace
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.   This is to announce a new email list focusing on software
  2141. installation and maintenance issues, following the workshop talk of
  2142. LISA VI. Those who have received announcements from me already know
  2143. that they are on the list, those that haven't should contact me
  2144. directly please :)
  2145.  
  2146.   TO SUBSCRIBE:
  2147.  
  2148.         please send mail to: soft-managers-request@nas.nasa.gov
  2149.  
  2150.  
  2151.   TO SEND TO THE LIST
  2152.  
  2153.         please send mail to: soft-managers@nas.nasa.gov
  2154.  
  2155.  
  2156. Questions may be sent directly to me, and I will begin an FAQ. For
  2157. those of you who have not received the notes from the meeting (thanx
  2158. to Rob Slater for typing them in!!) please let me know and I will be
  2159. sure to send them directly. They have been posted accordingly to
  2160. comp.org.usenix
  2161.  
  2162. Cheers!
  2163.  
  2164. -----------------------------
  2165.  
  2166. From: Ronda Hauben <ae547@yfn.ysu.edu>
  2167. Subject: Newmbox-length of mbox  != spool mailbox length!!
  2168. Date: 12 Nov 92 07:23:57 GMT
  2169. Sender: Usenet News Admin <news@news.ysu.edu>
  2170. Nntp-Posting-Host: yfn.ysu.edu
  2171. To:       info-unix@sem.brl.mil
  2172.  
  2173.  
  2174. I have just found it impossible to get into my mailbox and 
  2175. wonder if someone can explain what the message I am getting
  2176. means and what to do about it.
  2177.  
  2178. when I type mail I get a message that says
  2179. newmbox -length of mbox.! = spool mailbox length!!
  2180. exciting leaving mailbox in tact
  2181.  
  2182. Thanks.
  2183.  
  2184. Ronda
  2185. -- 
  2186. Ronda Hauben                    email address:ae547@yfn.ysu.edu
  2187. Amateur Computerist Newsletter              or
  2188. P.O. Box 4344                   rhauben@heartland.bradley.edu
  2189. Dearborn, MI 48126
  2190.  
  2191. -----------------------------
  2192.  
  2193. From: Jan-Piet Mens <jpm@logix.de>
  2194. Subject: Re: Newmbox-length of mbox != spool mailbox length!!
  2195. Date: 12 Nov 92 16:21:36 GMT
  2196. Followup-To: comp.mail.elm
  2197. To:       info-unix@sem.brl.mil
  2198.  
  2199. Note  Followup-To!
  2200.  
  2201. In <1992Nov12.072357.24534@news.ysu.edu> ae547@yfn.ysu.edu (Ronda Hauben) writes:
  2202.  
  2203. >when I type mail I get a message that says
  2204. >newmbox -length of mbox.! = spool mailbox length!!
  2205. >exciting leaving mailbox in tact
  2206.  
  2207. I'm looking for the problem myself. As a temporary solution, specify
  2208. the full pathname of your mailbox
  2209.  
  2210.         $ elm -f /usr/spool/mail/username
  2211.  
  2212. and if that doesn't work
  2213.  
  2214.         $ elm -f /usr/../usr/spool/mail/username
  2215.              ^^^^^^^^
  2216. This seems to be the only way to fool ELM... :-).
  2217.  
  2218. [ BTW, I have only noticed this problem since installing 2.4PL8 last night]
  2219.  
  2220.     -JP
  2221. -- 
  2222.     __  _____   __  __ 
  2223.    |  ||  _  \ |  \/  |    Logix GmbH                             jpm@Logix.DE
  2224.  __|  ||  ___/ |      |    Moritzstrasse 50, +49-611-309797   jpm@logixwi.UUCP
  2225. |_____||__|    |__||__|    D-6200 Wiesbaden  ...!uunet!mcsun!unido!logixwi!jpm
  2226.  
  2227. -----------------------------
  2228.  
  2229. From: nseth@desire.wright.edu
  2230. Subject: Help with generating random numbers
  2231. Date: 12 Nov 92 09:12:43 GMT
  2232. To:       info-unix@sem.brl.mil
  2233.  
  2234. I need help with generating random numbers. If I use the normail C routines
  2235. on UNIX for generating random numbers (random, rand, etc.) everytime the
  2236. program is executed, the sequence of random numers remains the same. 
  2237.  
  2238. How can I fix this so that each time I execute that program, the initial (and
  2239. thus the following sequence of) random numbers is different? On Turbo C the
  2240. subroutine randomize() takes care of this. Is there such a routine available on
  2241. UNIX/ULTRIX?
  2242.  
  2243. Any help will be greatly appreciated. Thanks a lot.
  2244.  
  2245. Nitin Seth
  2246. nseth@cs.wright.edu
  2247.  
  2248. -----------------------------
  2249.  
  2250. From: Samuel Ko <kko@fraser.sfu.ca>
  2251. Subject: Re: RFCs via FTP
  2252. Date: 12 Nov 92 10:03:54 GMT
  2253. Sender: news@sfu.ca
  2254. To:       info-unix@sem.brl.mil
  2255.  
  2256. sjsobol@wariat.org (Steven J. Sobol) writes:
  2257.  
  2258. >I know how to receive the text of Internet RFC's via e-mail, but is there
  2259. >an FTP site which holds them?
  2260.  
  2261. ftp site: nic.ddn.mil (IP: 192.112.36.5) 
  2262. directory: rfc (this one is sooooo obvious) ...
  2263.  
  2264. -----------------------------
  2265.  
  2266. From: as400064@orion.yorku.ca
  2267. Subject: HELP: tech terms reference
  2268. Date: 12 Nov 92 13:36:24 GMT
  2269. Sender: USENET News System <news@draco.ccs.yorku.ca>
  2270. To:       info-unix@sem.brl.mil
  2271.  
  2272. In article <1992Oct26.230256.28317@mdd.comm.mot.com>, bradley@mdd.comm.mot.com (Michael Bradley) writes:
  2273. > Novice question: I want to flush a stream socket after
  2274. > a send call. Can do? Email answers please.
  2275. >  Michael Bradley
  2276.  
  2277. -----------------------------
  2278.  
  2279. From: peter@essex.ac.uk
  2280. Subject: grep
  2281. Date: 12 Nov 92 13:41:49 GMT
  2282. Sender: news@sersun1.essex.ac.uk
  2283. To:       info-unix@sem.brl.mil
  2284.  
  2285. A quick question I was asked this morning. "Why is grep so called?"
  2286.  
  2287. -----------------------------
  2288.  
  2289. From: Michael Salmon <etxmesa@eos.ericsson.se>
  2290. Subject: Re: grep
  2291. Date: 12 Nov 92 14:43:22 GMT
  2292. Sender: news@ericsson.se
  2293. Nntp-Posting-Host: eos6c02.ericsson.se
  2294. To:       info-unix@sem.brl.mil
  2295.  
  2296. In article <6370@sersun1.essex.ac.uk>, 
  2297. peter@essex.ac.uk writes:
  2298. |> A quick question I was asked this morning. "Why is grep so called?"
  2299.  
  2300. It comes from an ed command:
  2301.  
  2302. g/re/p
  2303.  
  2304. i.e. globally search for a regular expression and print those lines
  2305. that match.
  2306.  
  2307. -- 
  2308.  
  2309. Michael Salmon
  2310.  
  2311. #include    <standard.disclaimer>
  2312. #include    <witty.saying>
  2313. #include    <fancy.pseudo.graphics>
  2314.  
  2315. Ericsson Telecom AB
  2316. Stockholm
  2317.  
  2318. -----------------------------
  2319.  
  2320. From: Tom Parker <tparker@music.scd.ucar.edu>
  2321. Subject: Re: Vi-question
  2322. Date: 12 Nov 92 18:05:34 GMT
  2323. Sender: USENET Maintenance <news@ncar.ucar.edu>
  2324. To:       info-unix@sem.brl.mil
  2325.  
  2326. In article <34054@adm.brl.mil> yellow@judy.indstate.edu (S. Vemula) writes:
  2327. >Hi,
  2328. >   
  2329. >     Sometime back, somebody mailed on how to use arrow keys in insert mode
  2330. >     also, to move around in the document.  I think, it is by mapping the
  2331. >     arrow keys.  Could somebody mail me as how i have to set up my keys.
  2332. >
  2333. >     thanks,
  2334. >     Shank Vemula
  2335.  
  2336.  
  2337. I do it with these lines in my .exrc file:
  2338.  
  2339. " Allow arrow keys to work in VI "text insert" mode
  2340. :map! ^[OA ^[ka
  2341. :map! ^[OB ^[ja
  2342. :map! ^[OC ^[la
  2343. :map! ^[OD ^[ha
  2344. --
  2345. +--------------------------------------------------------------------+
  2346. | Tom Parker             |  National Center for Atmospheric Research |
  2347. | tparker@ncar.ucar.edu  |  (303) 497-1227                           |
  2348. +--------------------------------------------------------------------+
  2349.  
  2350. -----------------------------
  2351.  
  2352. From: 25235-gokhman <esg@pyuxd.uucp>
  2353. Subject: mmap() with shared access fails over NFS using AIX 3.2 on RS 6000
  2354. Keywords: memory mapped files over NFS - is there a problem for write ?
  2355. Date: 12 Nov 92 15:27:10 GMT
  2356. Sender: USENET System Software <netnews@porthos.cc.bellcore.com>
  2357. To:       info-unix@sem.brl.mil
  2358.  
  2359. Hello netters,
  2360.  
  2361. I am trying to do mmap-ing to a file accross NFS using the following
  2362. arguments:
  2363.  
  2364.  caddr_t pointer = mmap(0, file_length, PROT_READ | PROT_WRITE,
  2365.                 MAP_FILE | MAP_VARIABLE | MAP_SHARED, fd, 0);
  2366.  
  2367. It appears to be successful. However, when I am trying to write
  2368. to the pointed region I get segmentation faults. Segmentation faults
  2369. do not necessarily occur right at the start of the region but also
  2370. in the middle and almost at the end at what seems to be page breaks,
  2371. e.g. location 4096 with 0-4095 bytes written successfully. The problem
  2372. does not occur when files are not NFS mounted. I am aware of the fact
  2373. that the earlier versions of mmap() under AIX 3.1.X were not allowing
  2374. writes over NFS, but my understanding is that AIX 3.2 and up do not
  2375. have this limitations - manuals at least do not mention it. Could it
  2376. be a router-related problem ? Help !!!
  2377.  
  2378. Following is the program that I use to examine this situation. Again,
  2379. it always failed over NFS and always worked locally on the same set
  2380. of files:
  2381.  
  2382. =========================== CUT HERE ==============================
  2383.  
  2384.                 Thanx in advance,
  2385.                 Ed Gokhman
  2386.  
  2387. #    include        <stdio.h>
  2388. #    include        <stdlib.h>
  2389.  
  2390. #    include        <sys/stat.h>
  2391. #    include        <sys/signal.h>
  2392. #    include        <fcntl.h>
  2393. #       include     <unistd.h>
  2394.  
  2395. #    include        <errno.h>
  2396.  
  2397. #    include        <sys/mman.h>
  2398. #       include         <sys/stat.h>
  2399. #       include         <sys/mode.h>
  2400. #       include         <sys/file.h>
  2401. #    include        <unistd.h>
  2402.  
  2403. char *ptr;
  2404.  
  2405. caddr_t pointer;
  2406.  
  2407. void bus_err_or_segment (int sig)
  2408. {
  2409.    fprintf (stderr, "Can not finish this test at byte=%ld", ptr - (char *)pointer);
  2410. }
  2411.  
  2412. main (int argc, char **argv)
  2413. {
  2414.     size_t    file_length;
  2415.     struct stat  statbuf;
  2416.     int    fd;
  2417.  
  2418.     if (argc < 2) {
  2419.       fprintf (stderr, "Usage: check <filename>\n");
  2420.       exit (1);
  2421.     }
  2422.     (void) signal ((int) SIGBUS, (void (*)(int)) bus_err_or_segment);
  2423.     (void) signal ((int) SIGSEGV, (void (*)(int)) bus_err_or_segment);
  2424.  
  2425.     if (!stat(argv[1], &statbuf))
  2426.     {
  2427.        if (!(file_length = statbuf . st_size))
  2428.        {
  2429.           fprintf (stderr, "%s - empty file\n", argv[1]);
  2430.           return;
  2431.        }
  2432.     }
  2433.     else
  2434.     {
  2435.           fprintf (stderr, "%s - does not exists\n", argv[1]);
  2436.           return;
  2437.     }
  2438.  
  2439.     fprintf (stderr, "Mapping %ld bytes in %s\n", file_length, argv[1]);
  2440.  
  2441.     if ((fd = open ( argv[1], O_RDWR, 0660 )) == -1)
  2442.     {
  2443.        fprintf(stderr, "Can not open %s with O_RDWR - %s\n", argv[1], strerror(errno));
  2444.        exit (1);
  2445.     }
  2446.  
  2447.     errno = 0;
  2448.  
  2449.     pointer = mmap(0, file_length, PROT_READ | PROT_WRITE,
  2450.         MAP_FILE | MAP_VARIABLE | MAP_SHARED, fd, 0);
  2451.  
  2452.     if (pointer == (caddr_t) -1 || errno)
  2453.     {
  2454.        fprintf(stderr, "Can not map %s - %s\n", argv[1], strerror(errno));
  2455.        return;
  2456.     }
  2457.  
  2458.     for (ptr = (char *)pointer; ptr < (char *)pointer + (int) file_length; ptr++) {
  2459.        char a = *ptr;
  2460.        *ptr = a;
  2461.     }
  2462.     munmap (pointer, file_length);
  2463.     fprintf(stderr, "Success for %s\n", argv[1]);
  2464. }
  2465.  
  2466. -----------------------------
  2467.  
  2468. From: Karl Larson <karl@rss.dl.nec.com>
  2469. Subject: PS command
  2470. Keywords: PS command
  2471. Date: 12 Nov 92 15:46:25 GMT
  2472. Sender: usenet@rsd0.rsd.dl.nec.com
  2473. Nntp-Posting-Host: mirage.rss.dl.nec.com
  2474. To:       info-unix@sem.brl.mil
  2475.  
  2476. This could possibly be SUN specific, but does anyone know what it means when
  2477. you have a process name "COMMAND" surrounded by "()" ie. "(biod)".  I thought
  2478. that possibly it implied a child of init, but I ruled this out when I saw
  2479. "-ksh (ksh)".  This is not a problem, it just came up in conversation and I
  2480. did'nt know. Further, the manuals don't describe such a beast.
  2481.  
  2482.  -----------------------------------------------------------------------
  2483. Karl Larson                                 (email) karl@rss.dl.nec.com
  2484. Software Engineer                           (home)  214-328-2563
  2485. NEC America - Richardson, Texas             (work)  214-907-4463
  2486.  -----------------------------------------------------------------------
  2487.  
  2488. -----------------------------
  2489.  
  2490. From: Erik Hoel <hoel@umiacs.umd.edu>
  2491. Subject: (Q) SLIP, Xylogics Annex boxes, MacX, MacTCP, MacSLIP
  2492. Date: 12 Nov 92 16:08:31 GMT
  2493. Sender: news@mimsy.umd.edu
  2494. To:       info-unix@sem.brl.mil
  2495.  
  2496. Basically, I would like to be able to display xterms on my Mac at home
  2497. while dialed into a Xylogics Annex box via a high speed modem and run SLIP,
  2498. etc.
  2499.  
  2500. On the Mac side, I have MacX 1.7, MacTCP 1.1.1, MacSLIP (a SLIP driver), and
  2501. a v.32bis modem. Various postings to the comp.sys.mac.comm newsgroup have
  2502. confirmed that this is everything that is necessary on the Mac end.
  2503.  
  2504. On the unix side, I am dialing into a Xylogics Annex box and rloging into
  2505. a DecStation. The Annex boxes have not been configured yet to run SLIP (it
  2506. is still undecided whether they _ever_ will). One of our system gurus has
  2507. built a SLIP kernel (under Ultrix 4.2) and provided me with a special login
  2508. that runs slattach.
  2509.  
  2510. At this point, I am able to login to my slip account via MacSLIP, but after
  2511. the standard login messages scroll by, I am promptly logged out. I have not
  2512. been able to determine whether the Annex boxes are blocking SLIP (do they
  2513. have this functionality?) or whether there is a problem elsewhere.
  2514.  
  2515. Does anyone have any experience running SLIP through an Annex box when the
  2516. Annex boxes have not been configured to do so (in the underhanded manner
  2517. that I have described ;-)?
  2518.  
  2519. Any pointers, etc. would be most appreciated.
  2520.  
  2521. Erik Hoel
  2522. hoel@asgard.umiacs.umd.edu
  2523.  
  2524. -----------------------------
  2525.  
  2526. From: "jeffrey.n.jones" <jeffj@cbnewsm.cb.att.com>
  2527. Subject: UUENCODE help!
  2528. Date: 12 Nov 92 17:32:29 GMT
  2529. To:       info-unix@sem.brl.mil
  2530.  
  2531. I am having a heck of time with uuencode. If I do the format that it calls
  2532. for, uuencode file remotefile, I get a screen full of ascii characters.
  2533. Rather then into remotefile. Then is seems after this happens uuencode 
  2534. dies and won't do anything other then "begin 666 qlist.z" and that's it.
  2535. This happens on all files I try it on. I have had the same problem on
  2536. this maching, on my SUN, on a UNIX box and even on my PC using a this
  2537. uuencode. HELP!
  2538.  
  2539. Jeff
  2540. -- 
  2541.  Jeff Jones  AB6MB         |      If we do not succeed,
  2542.  jeffj@seeker.mystic.com   |      then we run the risk of failure.
  2543.  Infolinc BBS 415-778-5929 |      Vice Pres. Dan Quayle
  2544.  
  2545. -----------------------------
  2546.  
  2547. From: Seamus Conlon <sconlon@vms.eurokom.ie>
  2548. Subject: Printing within Uniplex spreadsheet
  2549. Date: 12 Nov 92 18:15:41 GMT
  2550. To:       info-unix@sem.brl.mil
  2551.  
  2552.  
  2553. I have been asked by a novice Unix user to post a quesiton about Uniplex
  2554. to you Unix experts.
  2555.  
  2556. The question concerns the Uniplex spreadsheet.  The requirement is to
  2557. print from within a macro.  Apparently this does not work and when
  2558. a key tape is used, the print works during the recording of the macro
  2559. but not when it is being executed.
  2560.  
  2561. All sounds a bit strange to me but anyone got a solution?
  2562.  
  2563. Please e-mail (sconlon@vms.eurokom.ie).
  2564.  
  2565. Tks.
  2566.  
  2567. -----------------------------
  2568.  
  2569.  
  2570. End of INFO-UNIX Digest
  2571. ***********************
  2572.