HDTenEightyP/NetNews huggingface dataset:
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Making ``.plan'' EXECUTE a Program ???
Originator: tchrist@pixel.convex.com
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Date: Fri, 24 Jul 1992 13:16:05 GMT
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 evansmp@uhura.aston.ac.uk (Mark Evans):
:sadkins@bigbird.cs.ohiou.edu (Scott W. Adkins) writes:
:: 
::      The user's .plan or .project file cannot be a link to another file.  If
::      either of these files is something other than a regular file, it will be
::      ignored.
:
:This is because it was possible to do the following
:ln -s <any file> ~/.plan
:finger <my username>
:and read any file on the system on some versions of unix.
:The simplist fix is to just have fingerd refuse to read anything not a regular
:file.

Seem to me that doing this in fingerd:

    if (fork) return;
    setuid(-2);
    (do file reading
    exit(0);

Would have been better.

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


	And on the seventh day, He exited from append mode.
Newsgroups: comp.unix.questions
From: snk@fork.bae.bellcore.com (Samuel N Kamens)
Subject: Re: setenv question
Reply-To: snk@bae.bellcore.com
Organization: Bell Communications Research
Date: Fri, 31 Jul 92 11:57:41 GMT

In article <1992Jul31.065928.1366@u.washington.edu>, sue@byron.u.washington.edu (Shu-Chen Eclipse) writes:
> Hellow,
> 
> I'm a new beginer at unix. I was trying to do a  setenv FONTPATH ..long list
> of directories>, and I'm having problems.
> 
>   Because I couldnnt fit the list into one line, I tried to break i up:
> 
> setenv FP1  '...../.../:/...../.../:.../.../more stuff'
> setenv FP2 '$FP1:/..../.../:/.../..'
> setenv FP3 '$FP2:/..../.../:/..../..../'
> setenv FONTPATH $FP3
> 
> what I get is the $FPn dont get translated.  Also if I leave out the ' ', I get
> errors; if i try to enclose the stuff in ( ) like in set path =(list of directories), it complains about the "("; if I try ('diretories list') it doesn't
> complain about the "(", but it doesnt work.


You tried almost all of the combinations except the right one :-)

When you enclose something in single quotes (') in shell, environment
variables inside the quotes do not get expanded.  Try enclosing your
comands in double quotes ("), like this:

setenv FP1 '...../.../:/...../.../:.../.../more stuff'
setenv FP2 "$FP1:/..../.../:/.../.."
setenv FP3 "$FP2:/..../.../:/..../..../"
setenv FONTPATH $FP3

For that matter, you could have left the quotes out altogether because
there are no spaces in your environment variable values.

Sam

-- 
Sam Kamens					Bell Communications Research
snk@bae.bellcore.com				Phone: (908) 699-7509
444 Hoes Lane  Room RRC 1D-210
Piscataway, NJ 08854
Newsgroups: comp.unix.questions
From: eillihca@drizzle.Stanford.EDU (Achille Hui)
Subject: Re: question on "&"
Organization: DSO, Stanford University
Date: 30 Jul 92 17:20:11 GMT

sue@byron.u.washington.edu (Shu-Chen Eclipse) writes:

>I'm a crass beginnier in unix: I know "&" means something like start a 
>process running in the background, I guess, something like vms's "run/detached";while browsing through some scripts, I saw a line something like
>(/../.../some file name &)&.

>  what does the 2 "&" mean?
>thanx in advance,
>sue@byron.u.washington.edu

The 2nd "&" also means running the process in background. Consider the
following shell script:

#!/bin/sh
w & 
exec sleep 100

Run this in background and do a "ps", you will discover a process
marked as <exiting> or something like that. This is the "Zombie" left
by the process "w". The kernel has release all the resources attached
to this process except a process slot to hold its exit value. If its
parent doesn't wait for it, it will be there until its parent die.
Imagine you have a program that spawn off infinity many background
sub processes but doesn't wait for it. You will ultimately running
out of process slots and can't start any new process.

A common trick to avoid such zombies in shell scripts is the 
double fork you have noticed:

( ProgramInBackground &)&

When the outer shell die, the parent ID of the ProgramInBackground no
longer valid. The kernel replace this by 1, the process ID of the "init"
process which is the ancestor of all other process. Since init will 
take care of the exit value of ProgramInBackground when it exits, no
process slot will be wasted.

By the way, your question is one of the few questions that is appropriate
for this group. Don't be discouraged by other netters who don't know
when "RTFM -- Read the F-word Manuals" is the appropriate answer of
your question.

P.S:	If you really want to dig into detail of all this mess. look
	at the manual pages about the system call of exec, fork, wait
	and a very good reference of this stuff is Ch.2 of the book
	UNIX Network programming  by W.Richard Stevens.

Hopefully this helps....
-------------------------------------achille (eillihca@drizzle.stanford.edu)
JAUU	-- Just Another UNIX User.
From: navarra@casbah.acns.nwu.edu (John Navarra)
Newsgroups: comp.unix.questions
Subject: Re: Writing to multiple terminals
Date: 27 Jul 92 00:03:08 GMT
Organization: Northwestern University, Evanston Illinois.

In article <1992Jul26.233024.5849@mnemosyne.cs.du.edu> sshrivas@mnemosyne.cs.du.edu (Sumeet Shrivastava) writes:
>
>
>Hi,
>    Is there someway that one can write to multiple terminals ?
>
>    i.e. I want to give a demo, so how can a person on another terminal
>    see whatever is the output on my terminal ? ... assuming that the 
>    other person is logged on to the same machine but with a different login.
>

	Yes, here are two which come to mind:

1) Get the expect script called 'kibitz'. This not only lets other users
   see what you are doing on your machine but also lets them participate.
   As a teaching tool, it has it merits but all users will be granted full
   permissions of the person who initiates the kibitz, so if that is not
   what you want, try #2

2) Use the command:

   script /dev/null | tee /dev/ttyp1 | tee /dev/ttyp2 | ... | tee /dev/ttypN


This is more of a pain in the ass because you need to know everyone's tty
number. It is simple enough to write a script to find them though I suppose.

Good luck
-tms

-- 
From the Lab of the MaD ScIenTiST:
					
navarra@casbah.acns.nwu.edu
From: lwall@netlabs.com
Newsgroups: comp.unix.questions
Date: 18 Jul 92 00:29 MDT
Subject: Re: stripping trailing blank lines
Nf-ID: #R:1992Jul16.065321.334861@zeus.cal:-1715338178:1992Jul17.202902.20496@netlabs.c:1613040256:001:1184
Nf-From: netlabs.com!lwall    Jul 18 00:29:00 1992


In article <1992Jul16.133348.21297@news.eng.convex.com> tchrist@convex.COM (Tom Christiansen) writes:
: From the keyboard of ctuel@zeus.calpoly.edu (Cliff Tuel):
: :I'm looking for a quick and dirty way to strip trailing blank lines 
: :from a file.  I know I can use a script based on "tail -1" and a
: :temporary file, but is there an easier way to do it with sed, awk,
: :perl, etc.?
: :
: :------ Sample input ------
: :this line has text
: :so does this one
: :the next line is blank
: :
: :the previous line is blank
: :the next two lines are blank
: :
: :
: :------ Sample output -------
: :this line has text
: :so does this one
: :the next line is blank
: :
: :the previous line is blank
: :the next two lines are blank
: :----------------------------
: 
: I'm sure someone else will provide a sed solution and maybe even and awk
: one, and if Larry Wall isn't too busy, he'll give us one in nroff.  

Whaddya mean, "too busy"?  It's not as if it takes all day.

#!/bin/sh
(
    cat <<-'END'
	.de TR
	'di
	.pl 1000v
	.aa
	.ST
	..
	.de ST
	.pl 1n
	'di aa
	.nr .i 0
	.it 1 TR
	..
	.nf
	.ST
	END
    cat ${1-"$@"}
) | nroff

Seems perfectly straightforward to me...  :-)

Larry
From: johnboyd@ocdis01.oc.aflc.af.mil (John Boyd;LAHDI)
Newsgroups: comp.unix.questions
Subject: Unix-C-Booklist
Date: 21 Jul 92 15:23:56 GMT

I did an archie search for the subject list recently, and the results
yielded versions that were all either *very* or relatively old.  Can
someone tell me where the most current version of the doc is usually kept?
Thanx!!
========================================================================
"Cherish your memories; the rest ends up in a garage sale" -Ferris Beuler 
Dis:If you ask the Air Force, they'll tell you I don't know what I'm
talking about.
From: marby@laura.harvard.edu (Craig Marby)
Newsgroups: comp.unix.questions
Subject: Re: Redirecting the date as a file name
Date: 23 Jul 92 20:49:59 GMT
Organization: Chemistry Dept., Harvard University
In-reply-to: bacon@odin.unomaha.edu's message of 22 Jul 92 22:26:11 GMT

>>>>> On 22 Jul 92 22:26:11 GMT, bacon@odin.unomaha.edu (Melissa Bacon) said:

>> I'm setting up a .logout file that shows files that I have edited or
>> added in the past day.  So far, so good.  This was no problem.  However,
>> now what I want to do is to take the system date and tee my list of
>> files to another file with the date (  date | cut -c5-10 ) as the
>> filename.  How can I redirect the output of that command and use it to
>> create a filename (for example, today's file should have the name
>> 'Jul 22' ?  Is it possible to save the output as a string which then
>> could be outputted as the filename?

>> Thanks for any and all help.

>> Melissa


How about

#!/bin/csh
set output = `date +%b%d`   # note ` quote used
#  above sets output to eg Jul23 -- see `man date` for other possibilities
ls -l * > $output

The above should do the trick
--

    __o         
  _ \<,_       Craig A. Marby    marby@layla.harvard.edu
 (_)/ (_)      
~~~~~~~~~~
Newsgroups: comp.unix.questions
From: shiao@ans.net (Dennis Shiao)
Subject: Re: Whois/What is Archie
Date: Fri, 24 Jul 1992 16:14:22 GMT
Organization: Advanced Network & Services, Inc. - Elmsford, NY


>I keep seeing references like this to "Archie".  It looks like Archie is
>a host that maintains some type of master index to most anonymous ftp
>host and the programs available on each.  Is this true?  I have tried
>many wildcard searches of the whois database at the NIC with no luck.
>How do I reach Archie?  What is the full host name and what is it's IP
>address?

John,

You are correct in your assessment of Archie. There are four servers 
running in the U.S. (archie.ans.net, archie.sura.net, archie.unl.edu
and archie.rutgers.edu), and many others worldwide. They can be 
accessed via remote login, e-mail and the Prospero protocol. For more
information, check out ftp.ans.net:/pub/archie/doc (147.225.1.2). These
documents should be available at the other sites as well.

-Dennis.
--
Advanced Network & Services, Inc.    E-Mail: shiao@ans.net
100 Clearbrook Road                  Office: (914) 789-5340
Elmsford, NY 10523		     Fax:    (914) 789-5310
Newsgroups: comp.unix.questions
From: pew@cs.brown.edu (Peter E. Wagner)
Subject: Should I use awk, perl, or something else?
Organization: Brown University Department of Computer Science
Date: Mon, 27 Jul 1992 15:15:29 GMT

I've got a task that requires the extraction of pieces of text based
on the context of the text within the document.  More specifically, I
have an SGML document from which I need to extract the title elements
from certain types of sections.  

I'm trying to decide how best to attack this problem.  I don't think
it's going to be hard to do this, but I want to choose the right tool.
I believe that I can do it in either awk or perl, but I don't know
either, so I'm looking for recommendations.  I've got two books in
front of me: Programming Perl (Wall, Schwartz) and The AWK Programming
Language (Aho, Kernighan, Weinberger)...

Which is the better tool for the job?  Is there something else that I
should use?  Thanks in advance, and email to pwagner@ejv.com (not the
address from which this article was posted) would be great, as it's
hard for me to read this newsgroup at present.

    >p
----------------------------------------------------------------
Peter E. Wagner          (212)460-5672        pwagner@ejv.com
52 E 13th St. Apt. 5E       	    	      pew@BROWNCS.BITNET
New York, NY 10003  	    	    	      uunet!brunix!pew
From: Christophe.Wolfhugel@univ-lyon1.fr (Christophe Wolfhugel)
Newsgroups: comp.unix.questions
Subject: Re: Finger and .plan, .project
Date: 26 Jul 1992 15:06:20 +0200
Organization: INSA Informatique, Lyon, France
NNTP-Posting-Host: grasp1.univ-lyon1.fr

scotth@felix.filenet.com (Scott Hopson) writes:
> [use a named pipe]
> You must be sure that this daemon gets started after your system
> is rebooted or readers like "finger" will hang.

You can't be sure that the daemon will still be around when someone
will be fingering you.  It's not because you start it a boot time
(first you need priviledge to do this) that it will still be in the
air two days later.

Second, just imagine if I'd allow that to my 300+ users?  Do you really
except a SA can tolerate 300 permanent processes for just nothing?

A viable solution would be to change the fingerd to something that
fits your need. It's as easy to do as the replacement code you have
proposed and it has the advantage to generate one active process
per finger!

Please folks, don't use named pipes for you finger stuff, this is
not the good approach.

-- 
Christophe Wolfhugel    |    Email: Christophe.Wolfhugel@univ-lyon1.fr
   "No keybord, press F1 to continue"
Newsgroups: comp.unix.questions
From: art@wvus.org (Art Nicolaysen)
Subject: Re: Info on Linix wanted
Reply-To: art@wvus.org (Art Nicolaysen)
Organization: World Vision U.S.
Date: Thu, 30 Jul 92 02:02:52 GMT

In article <matess.712333811@gsusgi1.gsu.edu> matess@gsusgi1.gsu.edu (Eliza Strickler) writes:
>I was interested in getting UNIX for a DOS 
>machine. I heard that Linix was a good and
>free version of UNIX for DOS. Does anyone
>have any experience or information on this?
>Does UNIX on a DOS machine get rid of 
>memory and adressing problems?
>
>Any information is appreciated,

Don't want to insult your intelligence, but there are a few 
really apropos newsgroups for you to explore:

comp.os.linux
comp.os.coherent  (it's not really free ($99.00), but it will suck up
		   less memory and hard disk space.  good for cutting
		   your teeth, not so good for serious development
		   work)


-----------------------------------------+----------------------------------
  "Always do right.  You will gratify    | Art Nicolaysen    art@wvus.org
   some people, and astonish the rest" 	 |
  		     Mark Twain		 | (somewhere in los angeles county)
-----------------------------------------+----------------------------------

--
From: tmike@cmptrc.lonestar.org (T. Mike Howeth)
Newsgroups: comp.unix.questions
Subject: Re: deleting lines in vi
Keywords: vi, delete
Date: 25 Jul 92 15:39:46 GMT
Organization: CompuTrac Inc., Richardson TX

In article <1992Jul24.224455.12496@mrspoc.Transact.COM> steven@Transact.COM (Steven List) writes:
|
|When deleting, yanking, or otherwise modifying using movement commands,
|VI only works on whole lines.  So using either 'a or `a will have the
|same effect in this context.
|

Are you running a HOMEMADE copy of vi????  vi certainly DOES work on portions 
of lines!

-- 
tmike@cmptrc.lonestar.org                                               __
"Whoever said 'getting there is half the fun'                           \/
    has never ridden in a class 8 probe!"
Xref: sparky comp.unix.questions:9458 comp.unix.misc:3023
From: dkowalsk@usdsd1.DaytonOH.NCR.COM (Dennis Kowalski)
Newsgroups: comp.unix.questions,comp.unix.misc
Subject: Re: proper mode for /tmp?
Keywords: chmod /tmp
Date: 27 Jul 92 17:22:18 GMT
Reply-To: dkowalsk@usdsd1.DaytonOH.NCR.COM (Dennis Kowalski)
Organization: NCR USG Data Services Division

In article <1992Jul23.185224.9341@news.uni-stuttgart.de> skok@itwds1.energietechnik.uni-stuttgart.de (Holger Skok) writes:
>
>Hi all you UN*X gurus out there!
>
>I recently deleted my entire /tmp-directory on a SUN IPX. (faulty
>crontab entry). 
>How do I set the the proper mode for that directory? What do the entries 
>in the output of ls -l mean?
>More specifically: what number goes here (v)?
>				    chmod ?777 /tmp
>and what are these:  v     v ?
>                  drwsrwxrwt ... /tmp
>
>Any help appreciated!
>-- 
>*************************************************
>*	Those stupid, horse-brained masses! 	*
>*			OPUS (of meadow fame)	*
>*******************************************HSK***




I would think that the proper mode would be 1777.

The 1xxx format of chmod sets the "sticky bit" in the directory entry.

The "sticky bit" will inhibit any user (except root) from deleting any
file that is not owned by that user id.

The sticky bit is needed because without it, anyone with write permission
to a directory can delete any file in the directory, even if he/she does not
own the file or even have write permission to it.

It is really odd that you can not modify the files owned by someone else,
but you can delete them.

That is because by virtue of having write permission at the directory level, 
one is allowed to perform directory level maintenance (i.e. remove unwanted
files).

At least that is the way it works on out SVR 5.3 system.

-- 
Dennis Kowalski         NCR Corporation  PCD-3                  (513) 445-1843
Systems Architecture    1700 S. Patterson Blvd              VOICEplus 622-1843
USG Data Services Div   Dayton, Ohio     45479 Dennis.Kowalski@DaytonOH.NCR.COM
Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Argh! Regular expressions with [ef]grep
Organization: Northwestern University, Evanston Illinois.
Date: Sat, 25 Jul 1992 03:50:16 GMT

I have two related questions on regular expressions using some form of
grep. They both involve grouping the pattern with ()'s and doing some
form of counting of the number of occurences of the pattern within
the paranthesis.


	Say I have the following file:

0
00
000
0000
00000
000000
0000000
...

	and I issue the following commands:

$ grep '^0\{1\}$' testfile 
0
$ grep '^0\{2\}$' testfile 
00
$ grep '^0\{1,3\}$' testfile 
0
00
000

Now, however, I want to change each '0' to a '123':

123
123123
123123123
123123123123
123123123123123
123123123123123123
123123123123123123123

and I want to get the same results with the pattern matching.
I want to print out the lines with one string of '123', the 
lines with two strings of '123',  or at least 1 but no more than
3 strings of '123'  

Is there some way using a form of grep to do this? Egrep has '()' grouping
but doesn't have the \{n,m\} stuff. And grep has the opposite. Grrr. 

Secondly, what if my file looked like:

123.105.113.13
123.123.113.13
123.123.123.13
123.123.123.123

How would I print out the lines matching the following conditions:
1) only one occurence of '123'
2) two or more occurences of '123'
3) at least two but no more than 4 occurences of '123'.


Is grep disabled or am I?

-tms


~
~
-- 
From the Lab of the MaD ScIenTiST:
					
navarra@casbah.acns.nwu.edu
From: hsch@influx.sub.org (Heinrich Schnermann)
Newsgroups: comp.unix.questions
Subject: Re: deleting lines in vi
Date: 25 Jul 92 14:03:30 GMT
Reply-To: hsch@influx.sub.org
Organization: Heinrich Schnermann, Hannover
X-Mailer: uAccess - Macintosh Release: 1.5v4


In article <1992Jul15.132312.12499@ryptyde.cts.com> (comp.unix.questions), scott@ryptyde.cts.com (Scott McClure) writes:
> When editing with vi, and you want to remove everything below the current 
> line, is there a function to do this?  Pressing "DD" nine million times
> gets a bit old.

Most people answered to press dG (to delete below the current line
this should be jdG), but this is too easy.

What do you think about d1GdG"2pkdd ?

:-), Heinrich

Heinrich Schnermann, Wichmannstra'e 26, D-3000 Hannover 81,
Tel: +49-511-835603, Fax: +49-511-835605
Newsgroups: comp.unix.questions
From: etxmesa@eos.ericsson.se (Michael Salmon)
Subject: Re: Redirecting the date as a file name
Keywords: redirection filenames date-to-filename
Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
Organization: Ericsson Telecom AB
Date: Fri, 24 Jul 1992 07:30:19 GMT

In article <bacon.711843971@odin>, bacon@odin.unomaha.edu (Melissa Bacon) writes:
|> I'm setting up a .logout file that shows files that I have edited or
|> added in the past day.  So far, so good.  This was no problem.  However,
|> now what I want to do is to take the system date and tee my list of
|> files to another file with the date (  date | cut -c5-10 ) as the
|> filename.  How can I redirect the output of that command and use it to
|> create a filename (for example, today's file should have the name
|> 'Jul 22' ?  Is it possible to save the output as a string which then
|> could be outputted as the filename?

From the man page for date:

     If the argument begins with +, the output of date  is  under
     the control of the user.  The format for the output is simi-
     lar to that of the first argument to printf(3V).  All output
     fields  are  of fixed size (zero padded if necessary).  Each
     field descriptor is preceded by % and will  be  replaced  in
     the  output  by  its  corresponding  value.   A  single % is
     encoded by %%.  All other characters are copied to the  out-
     put  without change.  The string is always terminated with a
     new-line character.

     Field Descriptors:
          n    insert a new-line character
          t    insert a tab character
          m    month of year - 01 to 12
          d    day of month - 01 to 31
          y    last 2 digits of year - 00 to 99
          D    date as mm/dd/yy
          H    hour - 00 to 23
          M    minute - 00 to 59
          S    second - 00 to 59
          T    time as HH:MM:SS
          j    day of year - 001 to 366
          w    day of week - Sunday = 0
          a    abbreviated weekday - Sun to Sat
          h    abbreviated month - Jan to Dec
          r    time in AM/PM notation

Hence something like `date +NewFiles.%y.%j` will give you a unique file
name over the next century. Customise according to taste.

-- 

Michael Salmon

#include	<standard.disclaimer>
#include	<witty.saying>
#include	<fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm
Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Strange behavior with paste command
Organization: Northwestern University, Evanston Illinois.
Date: Mon, 27 Jul 1992 14:19:28 GMT

I don't get this! Why does the following happen with the paste command:

$ paste file1 file2 file3 > file.results
$ cat file.results
lsr005-1.wav    5.050659E-03    8.773804E-03
lsr005-2.wav    9.506226E-03    1.493835E-02
lsr005-3.wav    .0128479        1.991272E-02
lsr005-4.wav    1.850891E-02    .0272522
lsr005-5.wav    2.275085E-02    3.291321E-02
lsr025-1.wav    4.780579E-02    6.880188E-02
lsr025-2.wav    6.732178E-02    9.716797E-02
lsr025-3.wav    9.461975E-02    .1350403
lsr025-4.wav    .1144867        .163559
lsr025-5.wav    .1334534        .1909943
lsr1-1.wav      .3167419        .4694824
lsr1-2.wav      .5150909        .739624
lsr1-3.wav      .7581482        .9957733
lsr1-4.wav      1.062622        1.255859
lsr1-5.wav      1.37088 1.504074


What's up with the last line? Is there some way to make this print  
out right?

-tms

-- 
From the Lab of the MaD ScIenTiST:
					
navarra@casbah.acns.nwu.edu		
Newsgroups: comp.unix.questions