HDTenEightyP/NetNews huggingface dataset:
From: bhoughto@sedona.intel.com (Blair P. Houghton)
Subject: Re: vi (cut and paste)
Keywords: vi
Organization: Intel Corp., Chandler, Arizona
Date: Mon, 17 Aug 1992 17:04:16 GMT

In article <3815@keele.keele.ac.uk> phd85@seq1.keele.ac.uk (D.H. Holden) writes:
>    Does anyone know how you cut a range of text to one
>    of the named buffers, where the range does not cover
>   an integer number of lines, i.e., 
>  How do i cut from here > text  text text ..........
>  ............... n number of lines .....
> ...... to here <  into the named buffer "a for example?

Go to one end of the range and set a mark, then go to the
other end and buffer-yank-to-marked-character, using
double-quote and back-tick; for example, (the mark is "a"
and the buffer is "f", the first letter in the range is the
"b" in "bazz" and the last is the double-quote before the
"b" in "bar"):

	/bazz
	ma			<-- set the mark
	/bar
	"fy`a			<-- yank to marked character
	/result
	nn"fp

The result is:
The rbazz" and the last is the double-quote before the
"b" in "esult is:


				--Blair
				  "Cake."
Newsgroups: comp.unix.questions
From: frank@D012S436.sniap.mchp.sni.de ()
Subject: Re: Shared memory baby question on ultrix 4.2
Organization: Siemens-Nixdorf AG
Date: Fri, 21 Aug 92 10:34:45 GMT

aipost@otago.ac.nz writes:
: Help Help Help
: 
: !!!! please e-mail me at deano@piglet.otago.ac.nz not the posting address
: 
: I don't understand shared memory.  Sorry, but all I can find in the
: documentation for our DECstations is the man pages which tell me what to use
: and what to pass but not HOW to use ?!?!?!?!?!?
: 
: I am using Ultrix 4.2 etc ...... on DECstation 5000/200's
: 
: at the moment I do this :
: 
: key = ftok("/tmp", 'a');
: shmid = shmget(key, 64, IPC_CREAT | IPC_EXCL);

			what permissions does this give your shm?
			(you can check by typing 'ipcs'
			at the command line.)
			it may be that you don't have RW access
			for the shm
			try IPC_CREAT | IPC_EXCL | 0660

			also this may return -1  if the shm has
			already been created.  If so you should
			try again with IPC_CREAT | 0660 (no EXCL)

: s = shmat(shmid, 0, SHM_R | SHM_W);

why not check these calls for (-1) return codes and do a perror()
if you get a failure.  At least then you'll know which call fails.
Sometimes the message even makes sense!

i.e. if ((r=nastysystemcall(nastyparameters))==-1)
     {
	perror("nastysystemcall");
	exit(1);
     }
	
Check your man page (yes, again) to ensure that the call in
question does in fact return -1 on error.  There's always
one that doesn't.
: 
: *s = 1; /* BARF BARF BARF, kernel acces since s == -1 */
: 
: help help help 
: 
: sorry this is probably a really dumb question on the wrong roup
: but hey it's all I know how to do !!!!

Seems like the right group to me...

: 
: deano
: 
: p.s: please e-mail me at deano@piglet.otago.ac.nz not the posting address
: -- 
: ==============================================================================
: 
:                               "The AI Kids"
:                      Department of Computer Science
:                            University of Otago
:                                New Zealand
:                        Internet: AIPOST@otago.ac.nz
--
Frank O'Dwyer		       			Disclaimer: 
Siemens-Nixdorf AG 	                        I will deny everything
Tel.  : +49 (89) 636-40639                      Fax.  : +49 (89) 636-45860
e-mail: Frank.ODwyer@sniap.mchp.sni.de
Newsgroups: comp.unix.questions
From: darcy@druid.uucp (D'Arcy J.M. Cain)
Subject: Re: problem with vi..
Date: Sun, 23 Aug 1992 13:21:41 GMT
Organization: D'Arcy Cain Consulting

Josef Moellers <mollers.pad@sni.de> writes:
>[ One way to remove ^M's deleted ]
>I usually do ":1,$s/.$//", as the ^M's are the last character on a line.
>This works fine. Then I do "G" and get rid of the ^Z's (e.g. "Gdd").

It seems to me that sed is overkill for getting rid of a single character
in a file.  How about:

    tr -d '\015'

-- 
D'Arcy J.M. Cain (darcy@druid.com)  |
D'Arcy Cain Consulting              |   There's no government
Toronto, Ontario, Canada            |   like no government!
+1 416 424 2871          DoD#0082   |
From: les@chinet.chi.il.us (Leslie Mikesell)
Newsgroups: comp.unix.questions
Subject: Gnutar questions
Date: 22 Aug 92 02:53:40 GMT
Organization: Chinet - Public Access UNIX

I'd like to set up a system using cpio to make full backups followed
by daily GNUtar incrementals.  (This is for SysV where dump isn't
an option).  I'll probably base the incrementals on the full backup time
rather than each other so a complete restore only takes two tapes.
Problems:  Using the -N date option, all the directories on the filesystem
are archived even if they are older than the specified date.  Also, the
+listed-incremental option seems to be the best way to handle incremental
backups, but it expects to be given a filename containing a list of
directories seen by the previous run.  Otherwise it considers all the
directories to be new and archives all their contents. If I use cpio for
the full backup, I don't such a list for the incremental.  Is there an
easier way to create one than doing a dummy tar to /dev/null?  Maybe a
perl script that would generate the file with device and inode numbers
and directory names? Or a hack to gnutar to create the file and quit?

Les Mikesell
  les@chinet.chi.il.us
Xref: sparky comp.unix.questions:10015 comp.unix.shell:3467 comp.sys.hp:9216
From: elmar@knipp.en.open.de (Elmar Knipp)
Newsgroups: comp.unix.questions,comp.unix.shell,comp.sys.hp
Subject: Re: Strange side effects caused by calling sh functions with args.
Date: 10 Aug 92 20:15:47 GMT
Distribution: comp
Organization: Private/FRG

smr@iti.org (Stephen Riehm) writes:

>I am maintaining a rather large shell script, with many functions, and
>it appears that if a function is called with some arguments, then the
>arguments to that function become the arguments to the entire
>script. Is this the normal way that this should work? I have checked
>the following script, on the sun I get what I expect, but on the HP I
>don't. Which shell is right?? ( My reference manual only states:
>functions in shell scripts have access to $# $* and $1-9, it doesn't
>specify any side effects. The HP manpage doesn't even mention sh
>functions )

I had the same problem with "sh" on a HP9000/720 with HP-UX 8.07.
Use the korneshell "ksh" and it works ok.

Elmar

--------------------------------+-------------------------------------
Elmar Knipp                     |     Voice:       + 49 231 975015-0
Knipp Satz und Bild digital     |     Fax 3:       + 49 231 975015-80
Technologiepark                 |     Modem:       + 49 231 975015-82
Martin-Schmeisser-Weg 9         |     ISDN-Server: + 49 231 975015-831
4600 Dortmund 50                |     E-Mail:  elmar@knipp.en.open.de
Germany                         |        
--------------------------------+-------------------------------------
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Changing file names
Originator: tchrist@pixel.convex.com
Date: Thu, 20 Aug 1992 13:34:34 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of biorn@phc.chalmers.se (Bjorn Sandell):
:In article <ac#n06l.bosak@netcom.com>, bosak@netcom.com (Jon Bosak) writes:
:|> 
:|> Here's a problem that must be very common but doesn't seem to get
:|> discussed in books for Unix novices.
:|> 
:|> Suppose I have a directory containing files named, for example,
:|> 
:|>       xyz920815a
:|>       xyz920815b
:|>       xyz920816
:|> 
:|> ...and so on.  I want to change the names of these files to
:|> 
:|>       920815a
:|>       920815b
:|>       920816
:|> 
:|> Who can provide the most elegant solution using just the basic Unix 
:|> tools (cp, mv, sed, awk, sh, csh)?
:
:
:Why not use ksh? 
:
: for file in xyz* ; do
:   mv $file ${file#xyz}
: done


On the day when all the systems I use run ksh, I'll be happy to use that
script, but I lack the disk space and the time to install ksh myself.
Until then, all systems from any vendor used at Convex run perl by
imperial fiat, so Larry Wall's rename script works quite fine.

Note that the ksh solution there works for just that case.  The perl
solution typified by:

    rename s/^xyz// *

is a general-purpose solution.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    If you have ever seen the grim word "login:" on a screen, your mind
    is now a wholly-owned subsidiary of The Death Star.
                John Woods in <14105@ksr.com> of comp.unix.bsd
From: p690851@austin.lockheed.com (p690851)
Newsgroups: comp.unix.questions
Subject: SCCS question: get with last modified date
Date: 18 Aug 92 20:39:28 GMT
Distribution: usa
Organization: "Lockheed Austin Division, 6800 Burleson Rd, Austin, TX 78744"

Is it possible using sccs-get to retrieve a file possessing the delta
date instead of the current date?

If not, any suggestions on how I would do this?

Thanks,
Brett
-- 
Blessed are the programmers for they shall automate the earth.   -SSL

Brett J. Larsen, inet: brettl@austin.lockheed.com, office: (512)386-4313
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: du blocksize=512 (Was: Simple AWK question)
Originator: tchrist@pixel.convex.com
Date: Fri, 21 Aug 1992 14:16:58 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of aegl@ossi.com (Tony Luck):
:Tom Christiansen <tchrist@convex.COM> writes:
:>Can anyone explain WTF POSIX.2 decided that utilities should report
:>things in demikilobytes instead of real k which we all are more
:>likely to think in?  
:
:Suppose you have a file system with zillions of little tiny files (for
:example /usr/spool/news).  You figure that you can keep the disk
:usage down (and thus the expiry time up) by making the filesystem with
:a 512 byte block size (or fragment size).  Now, if you have a "du" that
:only thinks in Kbytes, it won't give you the right answer when you want
:to know how much disk space will be freed up if you blow away all of
:"alt/useless/bogus/groups".

Are you saying that du's answer should vary depending on f/s geometry???

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist


    "We don't care.  We don't have to.  We're the Phone Company."
Newsgroups: comp.unix.questions
From: dgong@zeus.calpoly.edu (??????)
Subject: smtp question
Organization: California Polytechnic State University, San Luis Obispo
Date: Sun, 16 Aug 1992 04:15:41 GMT

How can files be sent via smtp?  
Help would be appreciated.

Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Re: Associative arrays in [gn]awk --whynot! (long but interesting)
Organization: Northwestern University, Evanston Illinois.
Date: Sat, 22 Aug 1992 03:27:05 GMT

In article <1992Aug21.152622.4819@bnr.ca> christo@bnr.ca writes:
>
>I think you are assuming too much.  As far as I know, associative arrays
>have _never_ been guaranteed to be ordered.  Let me dig out my Awk book by
>A, W, and K, and see what it says (dig dig dig dig)...
>
>  p.51: "  for (variable in array)
>                 statement
>        This loop executes _statement_ with _variable_ set in turn to
>        each different subscript in the array.  The order in which the
>        subscripts are considered in implementation dependent.  Results
>        are unpredictable if new elements are added to the array by
             ^^^^^^^^^^^^^
>        _statement_."
>
>This last quote makes it pretty clear that what you describe is not a
>bug, it's a feature.

	Again, let me re-state my assertions:

        1) The results are NOT unpredictable. Though they might be
           implementation dependent, I can figure out how the elements
           in an associative array will be printed if given the number
           of elements in an array. Some books would lead you to 
           believe that the output is random -- it is not. It is just
           screwy.

        2) I said that gawk only prints out associative arrays in 
           numerical order IF AND ONLY IF the elements in the array
           are in numerical order to begin with. This is contradictory
           or at the very least misleading in some books I have read
           where using gawk, the associative array was printed in 
           numerical order only because the input was in numerical
           order, not because of anything gawk did. Thus, if my elements
           were not in numerical order, gawk would rearrange them when
           output (and again, not in the same order they were read in)
           [ See O'Reilly Sed and Awk book p.191 for more]

        3) Nawk, gawk, and awk all print out associative arrays in 
           different screwed ways. Although each is predictable, none
           of them work properly. Obviously, most of you responding
           to this message know that they don't work right -- but know
           also, that they do not work differently. 
         

-tms 
-- 
From the Lab of the MaD ScIenTiST:
					
navarra@casbah.acns.nwu.edu
From: uzun@crash.cts.com (Roger Uzun)
Newsgroups: comp.unix.questions
Subject: Multi-Volume compressed CPIO Dump?
Date: 14 Aug 92 17:54:56 GMT
Organization: CTS Network Services (crash, ctsnet), El Cajon, CA

I have a bunch of files I need to unpack, the source distribution
for 386bsd, and I cannot figure out how to unpack them.
They are compressed, multivolume, CPIO dumps, split into
470 block files.  How do I uncompress these?

-Roger
--------------------------------------------------------------
bix: ruzun
NET: uzun@crash.cts.com
Newsgroups: comp.unix.questions
From: ccechk@nuscc.nus.sg (Heng Kek)
Subject: Alarm() and children
Organization: National University of Singapore
Date: Fri, 14 Aug 1992 05:55:43 GMT

If I have a program which spawns 20 children almost simultaneously
(i.e. via a loop) and arrange for a SIGALRM to be delivered after
'x' seconds in each of the children,  will the signal in one child
affect other children?

The alarm() is called in each of the children.

Thanks for any responses.

Heng Kek
National University of S'pore
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: How do I tell if a file is open for writing?
Originator: tchrist@pixel.convex.com
Date: Thu, 20 Aug 1992 13:27:11 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of benjy@athena.mit.edu (Benjamin B Thomas):
:I was wondering if there is an absolute method of determining if a
:file is open for writing. I have been doing:
:
:ls -s foo > tmp1
:sleep 5
:ls -s foo > tmp2
:cmp tmp1 tmp2
:...
:
:inside of a csh script that looks for files periodically and if they
:have finished growing, uses them. This would work fine except that the
:files are coming in over the net, which causes problems when it hangs
:and the file doesn't grow for awhile. 
:
:So, if anyone knows of a way to check that a file has actually been
:closed by whatever was writing it, please let me know.

Portable?  No.  But for those bound and determined, you can 
dive into the kernel can consult the open file table for 
entries matching that dev/ino with flags indicating write access.
I believe Dan Bernstein's pff program can do this for you.

Why you want to be doing this in a csh script is beyond me.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    If you have ever seen the grim word "login:" on a screen, your mind
    is now a wholly-owned subsidiary of The Death Star.
                John Woods in <14105@ksr.com> of comp.unix.bsd
Newsgroups: comp.unix.questions
From: hansm@cs.kun.nl (Hans Mulder)
Subject: Re: vi (cut and paste)
Keywords: vi
Organization: University of Nijmegen, The Netherlands
Date: Thu, 20 Aug 1992 15:35:18 GMT

In <515@alden.UUCP> sgr@alden.UUCP (Stan Ryckman) writes:
>In article <1992Aug17.200149.7817@s912%bnf.com> bibb@s912%bnf.com (Ken Bibb) writes:
>>In the following texT:
>>aaabbbbbb
>>bbbbbbbbb
>>bbbbccccc
>>
>>I'll assume you want to cut the b's out and save them into buffer a.
>>1) position the cursor at the beginning of the range to be cut (1Gfb will work
>>   in this example).
>>2) ma (mark the location with marker a)
>>3) move to the end of the range (Gfc will work in this example)
>>4) "ad`a will cut the range and put it into buffer a

>NOT!

>This grabs all three full lines.  (I tried it!  Did you?)

Yes.  It works.   What you did was "ad'a which indeed grabs three full lines.

Maybe you have a problem distinguishing quote (') from backquote(`).  They're
very similar on some displays.
If you use quote ('), you'll grab whole lines; if you use backquote(`), you'll
only grab the appropriate parts of the first and last lines.

--
Hope this helps

Hans Mulder			hansm@cs.kun.nl
From: derry@milton.u.washington.edu (Derry Lyons)
Newsgroups: comp.unix.questions
Subject: Login Message
Date: 21 Aug 92 23:49:16 GMT
Organization: University of Washington

Is there any way to edit the login screen on a Unix system?
I've never seen it done, nor have I found it mentioned.  Just
curious...  :-)  Derry


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=                                                                         =
=  Derry Lyons - N7YPG                  "Sometimes you're the winshield,  =
=           ...they call it a B.S.       sometimes you're the bug."       =
=              for a reason...                        -- Dire Straits     =
=                                                                         =
=  Call derry@u.washington.edu  /  If no answer: derry@afsc.noaa.gov      =
=                                                                         =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: bkuhn@rhlab.UUCP (bmk Bradley Kuhn)
Newsgroups: comp.unix.questions
Subject: newsfeeds over the internet
Keywords: newfeed, internet, usenet
Date: 16 Aug 92 05:06:50 GMT
Organization: Baltimore Rh Laboratory, Inc., Maryland

Can someone please tell me if it is posible to receive a Usenet
 newsfeed over the internet without subscribing directly to Usenet?
If so, what news software supports this?
Thanks.
Respond directly via mail or to this group.
-- 

 -- Bradley M. Kuhn    Computer Systems Development, Inc
     INTERNET: rhlab!bkuhn@uunet.uu.net OR bkuhn@loyola.edu
     UUCP:     ...uunet!rhlab!bkuhn


-- 

 -- Bradley M. Kuhn    Computer Systems Development, Inc
     INTERNET: rhlab!bkuhn@uunet.uu.net OR bkuhn@loyola.edu
     UUCP:     ...uunet!rhlab!bkuhn
Newsgroups: comp.unix.questions
From: gordon@osiris.cso.uiuc.edu (John Gordon)
Subject: man page formatting
Organization: University of Illinois at Urbana
Date: Sat, 15 Aug 1992 02:29:05 GMT
Keywords: man,format,printer

	On our laser printer, man pages come out too long.  The footer for
the 1st page prints a couple of lines down fron the top of page 2, and
successive footers keep getting lower and lower on successive pages.  Is
there any way to control the number of lines that man will print on a page?

	I'm running under DYNIX/ptx v1.3.1, and the printer is an HP
LaserJet III which is accessed through a Banyan network.

	Thanks for any help.

---
John Gordon                        My incredibly witty saying has been 
gordon@osiris.cso.uiuc.edu         Politically Corrected into oblivion.
Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Re: Associative arrays in [gn]awk --whynot! (long but interesting)
Organization: Northwestern University, Evanston Illinois.
Date: Sat, 15 Aug 1992 02:19:54 GMT

In article <1992Aug14.173952.12112@mccc.edu> pjh@mccc.edu (Pete Holsberg) writes
>In article <1992Aug13.063348.11691@news.acns.nwu.edu> navarra@casbah.acns.nwu.edu (John Navarra) writes:
>=======================
>=Here is a program that makes an associative array between the first and
>=fifth fields of a /etc/passwd-like file.
>
>Where did the values in the third field of the output come from? What's
>weird about the first two columns? It seems to me that they match
>insofar as the index and the value go.

	The third field was a replication of the results from printing out
the values stored in the array for a 15 line file (numbered 1-15). I just
wanted to point out the a one column (or one-field per line file) is output
differently than a multi-column (or multi-field per line) file with each
of the programs awk, nawk, and gawk.
 
>=Basically, associative arrays in gn[awk] are 
>=unreliable (especially for a multi-field file).
>
>Unreliable? In what way?

	With respect to order being read in. Obviously, many of you know
that this is a well-known bug. Some do not. However, gawk, which you may
expect to print out the values correctly (i.e in numerical order) only 
prints those values correctly if the file is in numerical order in the first 
place. This is not always going to be the situation! 
 
>
>=Gawk seems to be the
>=best at printing out arrays in the order which they were loaded in but
>=it does not do it correctly in all cases. 
>
>Order in "for (index in array)" is not specified by awk. If you need
>order, pipe the output to "sort".

	Yeah, but what if sort doesn't cut it? For instance, say I had the
file:

2
1
4
3
6
5
8
7
10
9
12
11
14
13
15

and I ran my program on it:
$ gawk -f showarray 15nums.mixed
2
1
4
3
6
5
8
7
10
9
12
11
14
13
15

This is not the correct order.
$ gawk -f showarray 15nums.mixed | sort -n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

	and this is not the correct order either. I *want* the output to
be printed in the *same* order it was read in!!! Now tell me how to do
that with sort if the numbers aren't in some order sort understands?
Now see where the problem is?  

-tms
-- 
From the Lab of the MaD ScIenTiST:
					
navarra@casbah.acns.nwu.edu
From: zzang@whale.stat.ufl.edu (Zhuo Zang)
Newsgroups: comp.unix.questions
Subject: Zmodem installation problem
Keywords: Zmodem modem stty tty
Date: 13 Aug 92 12:41:08 GMT
Distribution: usa
Organization: University of Florida

Hello,
I try to install the Zmodem on the DECstation
with Ultrix 4.2 .
After I compiled all the programs, rz ,sz ,....
I ran the programs. And it doesn't work.
The problem seems that the Zmodem didn't 
direct the data flow to the serial port
correct, I need to set the tty somehow,
but I don't know how.

We have Kermit running fine on the machine,
so it should be fine for the Zmodem.

Thanks in advance !

zhuo
Newsgroups: comp.unix.questions
From: tinsel@uiuc.edu (Thomas Aaron Insel)
Subject: Re: How to logout???
Originator: tai50080@uxa.cso.uiuc.edu
Reply-To: tinsel@uiuc.edu
Organization: {not speaking for the} University of Illinois at Urbana
Date: Thu, 20 Aug 1992 05:45:28 GMT
Keywords: logout

dmartin@pico.engr.mun.ca (Dan Martin) writes:
> I'm new to unix, dunno how to logout!


Script started on Thu Aug 20 00:43:21 1992
uxa> finger dmartin@pico.engr.mun.ca
[pico.engr.mun.ca] 
Login name: dmartin   			In real life: Dan Martin
Phone: 754-4285
Directory: /nfs/nano/elec/dmartin   	Shell: /bin/csh
Last login Tue Aug 18 14:09 on ttyp3 from 134.153.12.52
Project: What am I working on?
No Plan.
uxa> exit

script done on Thu Aug 20 00:43:44 1992

Looks like he figured out how.
-- 
Thomas Aaron Insel (tinsel@uiuc.edu)
  I speak for myself, and not for the State or University of Illinois.
  "We must not confuse dissent with disloyalty." -- Edward R. Murrow