HDTenEightyP/NetNews huggingface dataset:
From: christo@bcarh803.BNR.CA (Mark Christopher)
Subject: Re: Awk and getting the current date
Reply-To: christo@bnr.ca
Organization: Bell-Northern Research Ltd.
Date: Thu, 3 Sep 1992 22:20:04 GMT

In article <1992Sep3.135708.28491@rtf.bt.co.uk>, duplain@rtf.bt.co.uk
(Andy Duplain) writes:
|>In article <1992Sep1.214207.1@sc9> mbrodesky@sc9 writes:
|>>How can I get the current date in a AWK program
...
|>		#!/bin/sh
|>		awk -e 'BEGIN { 
|>			date="'`date`'"
|>		}
...

Or in nawk:

	nawk 'BEGIN { "date" | getline; date=$0}
        {
          print date,$0
        }'

Not tough.  Learn to read the manual.
-- 
Mark Christopher        Bell-Northern Research          christo@bnr.ca
Newsgroups: comp.unix.questions
From: msc@ssigate.ssinc.com (Michael S. Cross)
Subject: Re: Login Message
Summary: What system eh?
Organization: Systems and Synchronous Inc., Naperville, IL
Date: Thu, 27 Aug 1992 18:11:10 GMT

It is written:
>>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
>>
...
>
>In SVR3 (at least ISC's 3.0), it's in /etc/issue.

In most AT&T software the initial login prompt for tty ports is in
/etc/gettydefs.

Is that what you were refering to by "login screen"?

I don't see any mention of *386* in the header so I assume that you are
not talking about the PC Console, but that could be in there too.  I also
think the rlogin prompt is defined elsewhere, but I have not needed to
modify that (yet).

Hope it helps (tm).

Mike

-- 
Michael S. Cross         Work: msc@ssihub.ssinc.com               708-505-4508
      Home: 73750.1363@CompuServe.com  (but not exactly *proud* of it)
Systems and Synchronous Inc., 900 E. Diehl Rd, Suite 110, Naperville, IL 60563
__________________________To Live is to risk Dying____________________________
Newsgroups: comp.unix.questions
From: hoang1@litwin.com (Dave Jackson)
Subject: ioctl request SIOCGARP fail in SCO (ARP protocol)
Organization: Litwin Process Automation
Date: Fri, 28 Aug 1992 15:43:55 GMT

Hi,
I'm writing a program to read the ARP cache.
But I have the problem when using SIOCGARP in SCO/ODT ver 2.0:
  
  .
  .
  .
  int soc;
  struct arpreq ar;
  .
  .
  .
  /*
  **  Execute the IOCTL to read the ARP cache, if the host is not
  **  currently in the cache, this ioctl will fail.
  */
  if ((i = ioctl( soc, SIOCGARP, &ar )) != 0)

  It's always failed and return:
    errno == ENXIO
    ioctl: No such device or address

But if I test in DEC5000/200 Ultrix 4.2 or SUN/sparc OS 4.1.1 is ok.

Do I miss anything in SCO env.

I will post or mail my source code if you request.

Thanks in advance,

Ted Hoang
Litwin Process Automation
Email:hoang1@dynsim1.litwin.com

Newsgroups: comp.unix.questions
From: louk@research.teleride.on.ca (Lou Kates)
Subject: 80/132 column modes with curses
Organization: Teleride Sage Ltd., (Waterloo)
Date: Sat, 29 Aug 1992 00:32:05 GMT


Is it  possible to write an  application using curses that has as
one of  its  functions  the ability  to toggle  a VT100  terminal
between  80  and  132   column  modes? It appears that there  are
different termcap/terminfo entries for 80  and  132   column mode
effectively preventing the above.

This sort  of functionality can  be programmed on VAX/VMS systems
and I was wondering if it is possible on UNIX.

Lou Kates, louk@research.teleride.on.ca
Newsgroups: comp.unix.questions
From: peter@merlin.acadiau.ca (Peter Steele)
Subject: Should I use block or character devices for dumps
Organization: Acadia University
Date: Thu, 27 Aug 1992 11:22:03 GMT

I use the standard Unix dump command for my nightly backups, normally
referring to each filesystem's block device. E.g.,

dump 0ubsf 124 407424 /dev/rmt/hc5 /dev/sd0a

Would it be better to use character (raw) device specifiers instead? E.g.,

dump 0ubsf 124 407424 /dev/rmt/hc5 /dev/rsd0a

Opinions?
--
Peter Steele        Unix Services Manager            peter.steele@acadiau.ca 
Acadia Univ., Wolfville, NS, Canada B0P 1X0  902-542-2201  Fax: 902-542-4364
Newsgroups: comp.unix.questions
From: Chuck@clemson.edu (Chuck Heck)
Subject: Application/Capacity Planning
Organization: Clemson University
Date: Fri, 28 Aug 1992 18:15:49 GMT

Several areas at the University are discussing consolidating various stand alone
applications onto a single platform.  One group currently runs a MicrVAX 3400
under Ultrix with a Unidata database  This machine needs to be upgraded.  

Other areas such as the Bookstore, Laundry, Printing Services, etc. all have
standalone systems running in their respective areas, on platforms from PCs 
and Macs to an HP mini (sorry, don't know the model).  These areas would like
to have a computer system that would house a retail/financial system tht would
allow reporting on a profit/loss basis.  Two scenarios are possible
					1)  A system that provides daily operations for one or more areas
					2)  A system that would aggregate information passed to it from each
         individual area.
In either situation there would be somewhere from 50-100 people that would need
access to the machine.

The question:

Having said the above, the folks with the 3400 are planning to upgrade to a
DECsystem 5000/240.  The other areas would like to get a Unix box to do what
they want to do.  Can/should this be the same box that runs the Unidata stuff?
What would be an appropriately sized box that would have sufficient speed to run
the applications, and support 50-100 logins with reasonable response time?

I know that there are alot of unanswered questions, as well as some philosophical
ones here.  Ideally someone is doing the same thing.  Any and all input would
be appreciated.  Please e-mail, as I am not a regular to the group.

Thanks in advance,
  Chuck Heck <Chuck@clemson.edu>
From: James_P._Stratton.OSBU_North@xerox.com
Newsgroups: comp.unix.questions
Subject: Attaching a Modem
Date: 1 Sep 92 20:40:37 GMT

Hi,

I am trying to attach a Telebit TrailBlazer Plus to a SPARC.  I can get it to
respond when dialed into or I can get it to dial out via tip.  But I can not
seem to get it to do both.  I could use some guidance.

Thanks,

Jim Stratton

---------------------------------------------------------------
Phone: (415) 813-7086
Xerox email: stratton:OSBU North:Xerox
Other email: stratton:osbu_north@xerox.com
3400 Hillview Ave
P.O. Box 10034
Palo Alto CA 94303-0816
---------------------------------------------------------------
you are in a twisty little passage of standards, all conflicting
---------------------------------------------------------------
Newsgroups: comp.unix.questions
From: lux@sol.UVic.CA (Michael O'Henly)
Subject: How to delete link when target is rm'd?
Summary: How do I automatically delete a symbolic link when the target is rm'd?
Keywords: link target rm
Organization: University of Victoria
Date: 27 Aug 92 11:45:56 GMT

	Let's say I have a file...

		~/dir1/dir2/file

	...to which I create a symbolic link in the parent directory
using the command, "ln ~/dir1/dir2/file ~/dir1/file".

	What I want is to be able to "rm ~/dir1/dir2/file" and have
the link rm'd at the same time. 

	This seems to me to be the way things should work by default.
After all, the thing that the link points to no longer exists so why
is the link not automatically rm'd with the target?

	Thanks.

	Michael.
--
Michael O'Henly                 
McPherson Library                Internet:  lux@sol.uvic.ca
University of Victoria                      lux@uvvm.uvic.ca
Victoria, B.C., Canada             BITNET:  lux@uvvm
From: cosmo@cherry.ucsb.edu (Burtin;Boris;;;;COMS;Undergraduate;940630;911002;1000)
Newsgroups: comp.unix.questions
Subject: Re: How to determine user login time in minutes?
Date: 27 Aug 92 21:25:51 GMT

Thanks to all who replied.  It looks like I'm going to be stuck with doing my
own math when determining my login time.

I did get one suggestion that particularly perked my curiosity.  Richard Czech
(czech@gmd.de) suggested the following:

	Try to put the command "time" into your .logout file. Just "time"
	without any parameters gives you the uses system, cpu and real
	time of the current shell. 

Sure enough, this works when executed in real time.  But when you try to pipe
the output to a file or variable, it displays the _time_it_takes_to_perform
_that_action_!  

Does anyone have suggestions about how to keep the output of time which tells
me how long I've been logged in?  By the way, if it makes a difference, I'm
running tcsh on SunOS 4.1.2.

--
     - Boris
(cosmo@cs.ucsb.edu)
Newsgroups: comp.unix.questions
From: cse108@cse.unl.edu (Brian Wood)
Subject: VT100 screen codes
Summary: Need a reference for the codes
Keywords: VT100 graphics
Organization: University of Nebraska - Lincoln
Distribution: global
Date: Thu, 27 Aug 1992 06:40:13 GMT


THe following is a post for a friend:


Hi, I was wondering if anyone knew of a reference for the VT100.  I need to
write a program that effectively does a histogram, but I don't know where to
look for the codes.  I've seen some examples of the graphics, and I think 
that they'll work for what I need to do.

BTW this isn't homework, it's for a program I'm writing to find the transfer    
function of a quasar through a numerical convolution, and would like a 
rough idea of what all the numbers that spew out look like when graphed..


If there's a book or reference in the manuals (I haven't looked too hard yet)
I would appreciate the title or section name.  


					Thanks,

				 	Joe Centenni	
Newsgroups: comp.unix.questions
From: timk@tdkcs.waterloo.on.ca (Tim Kuehn)
Subject: uucp connectivity problems SCO <-> Prime 325 Unix
Organization: TDK Consulting Services
Date: Fri, 21 Aug 1992 21:14:51 GMT

I am having some problems getting a uucp connection between an 
old(er) Prime box (basically a 386/25 running Prime's Unix) and 
other uucp sites. On one end I have the Prime box w/a T2500 (running
as a 2400 baud [don't ask]), on the other end I have either a SCO 
Xenix w/TB+ or WAFFLE PC w/a GVC 2400 baud modem. Both the SCO 
and WAFFLE system uucp with a good number of other sites on a 
regular basis.

The basic situation is that the machines hook up, start a session, 
initiate a file transfer, and then die with "bad header" errors.

So far I've checked the gettydefs and inittab files to make sure 
the session was going w/an 8N1 configuration, but the problem 
persists.

Is there anyone out there with experience getting uucp going between
a Prime box and other uucp sites of various flavors that could give
me some other ideas to try or places to look?

+-----------------------------------------------------------------------+
| Tim Kuehn | TDK Consulting |(519)-888-0766| 				|
| <><       | Services       | timk@tdkcs.uucp timk@tdkcs.waterloo.on.ca|
+-----------------------------------------------------------------------+
From: b130778@hp9000.csc.cuhk.hk (MA NGAI LING)
Newsgroups: comp.unix.questions
Subject: specifying range in awk
Date: 28 Aug 92 01:30:50 GMT
Organization: The Chinese University of Hong Kong


	        I have a file looking like the following:

aaaa
bbbb
cccc
dddd
eeee
aaaa
bbbb
bbbbb
cccc

        I would like to use awk or sed or something else to get all   
ocurrence of a and anything between "c" and "e".  I tried 'a|c,e' and
other combination in awk without much joy.  Is there any way to do it?
Thanks in advance.

Ida
Newsgroups: comp.unix.questions
From: swolfson@nyx.cs.du.edu (Sabina Wolfson)
Subject: missing /etc/resolv.conf - help
X-Disclaimer: Nyx is a public access Unix system run by the University
	of Denver for the Denver community.  The University has neither
	control over nor responsibility for the opinions of users.
Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
Date: Wed, 2 Sep 92 02:22:55 GMT

Hello,

The machine I have an account on at school is *missing* the resolv.conf
file so that if I want to telnet/ftp somewhere I have to know the IP 
address of the site, not just the name.  Is there something like
gethostbyname() that will let me specify the name server to use (as is
it just defaults to the local host which is not acceptable)?  Or is 
there a way to get nslookup to use another namer server (as is I have to
wait a minute or two for it to default to the /etc/hosts file and then
specify another namer server -- this is a pain)?  Or is there some way
I can send a request to another name server (I know which namer server
my site should be using)?

Any help, hints, ideas would be appreciated!  Please post responses or
mail them to sabina@cns.nyu.edu.

Thanks!  Sabina :)

p.s. yes, I already talked to the sys admin about this a few times...
From: sm86+@andrew.cmu.edu (Stefan Monnier)
Newsgroups: comp.unix.questions
Subject: Re: A question on ls
Date: 29 Aug 92 17:27:32 GMT
Article-I.D.: andrew.Yec2E4i00Vol44IFh7
	<1992Aug29.235425.26762@mcc.com>
Distribution: na
Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Some more details (that I hadn't seen):

the grep version is a bit erroneous:
the point in grep means 'any char' and you must precise that the .Z 
has to be placed at the end of the name:

ls | grep -v '\.Z$'

But be careful to use a plain ls and not an alias. It could introduce some
problems (multicolumns, added character at the end, ...)

And with the ls-only version, you will have some problems if the considered 
directory has subdirectories!


	Stefan Monnier


-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------
From: sm86+@andrew.cmu.edu (Stefan Monnier)
Newsgroups: comp.unix.questions
Subject: Re: A question on ls
Date: 29 Aug 92 17:07:14 GMT
Article-I.D.: andrew.Uec1x2y00VolE4IFF=
	<1992Aug29.235425.26762@mcc.com>
Distribution: na
Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA

Excerpts from netnews.comp.unix.questions: 29-Aug-92 Re: A question on
ls Bill Bohrer@mcc.com (1088)

> In article <1992Aug29.233534.27967@umbc3.umbc.edu>
> rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
> >In article <6786@tekig7.PEN.TEK.COM> naren@tekig5.pen.tek.com (Naren
> Bala) writes:
> >>If I type
> >>% ls *.Z 
> >>All files with .Z extension are displayed.
> >>
> >>What command would I type to display all files that do not have a .Z 
> >>extension ?
> >
> >The wildcards are expanded by the shell, so the answer is: it depends on
> >the shell you are using.  In tcsh, you type:
> >% ls ^*.Z
> >In sh and csh you are out of luck.  In other shells, I don't know.
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> Not true, this should work in ALL shells:

> ls | grep -v '.Z'

All this is true, but don't forget that it won't list ALL the files
ending in .Z
the files beginning with a point will be 'forgotten' !
(I had quite a surprise a week ago)

	Stefan Monnier


-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------
From: hjbortol@impa.br (Humberto Jose Bortolossi)
Newsgroups: comp.unix.questions
Subject: How to justify texts on VI?
Date: 28 Aug 92 12:13:54 GMT

Hi!

    Is it possible to justify text on VI (for example, using a VI macro)?    
    Any solutions are welcome! Thanks!

    Humberto.
-- 
+------------------------------------------+----------------------------------+
! Humberto Jose' Bortolossi                ! bitnet:   hjbortol@brlncc.bitnet !
! Instituto de Matematica Pura e Aplicada  ! internet: hjbortol@gauss.impa.br !
! Estrada Dona Castorina, 110              +----------------------------------+
! Jardim Botanico                          ! voice:    55-021-294-9032 (185)  !
! CEP 22460 - Rio de Janeiro - RJ - Brazil ! fax:      55-021-512-4115        !
+------------------------------------------+----------------------------------+
Newsgroups: comp.unix.questions
From: net@cs.tu-berlin.de (Oliver Laumann)
Subject: Re: Unix naming conventions from the dark times
Organization: Technical University of Berlin, Germany
Date: Fri, 28 Aug 1992 09:15:36 GMT

In article <1992Aug27.110730.16828@fwi.uva.nl> stolk@fwi.uva.nl (Bram) writes:
> bin	-	binaries
> src	-	source
> lib	-	library
> [...]
> 
> Surely, some elderly fellow-unix-user must remember the origins for
> those names from the early days...

I wouldn't call myself `elderly' yet, but in the first UNIX system I
had access to (UNIX V6, around 1979), the /sys directory (or was it
/usr/sys?) still had sub-directories named `ken' and `dmr'.

At that time we didn't know the origin of these names; I remember
that a colleague of mine guessed that `dmr' might be the abbreviation
for `device management routines' and that the word `ken' must have
something to do with `kernel' :-)
Newsgroups: comp.unix.questions
From: benjy@athena.mit.edu (Benjamin B Thomas)
Subject: Inittab?
Organization: Massachvsetts Institvte of Technology
Distribution: na
Date: Fri, 28 Aug 1992 00:03:05 GMT




I was wondering if someone could help me clear something up.
The documentation I have leads me to believe that if I want to run a script from
/etc/inittab at run level 3 and insure that it remains alive, I need to add this
to /etc/inittab:

foo :3:respawn:/bin/sh -c 'exec /usr/local/bin/my_script'

The script gets executed (ps gives:  ...../usr/local/bin/my_script /usr/local/)

The script writes to a tmp file, sleeps, checks some stuff, and then writes over
the tmp file (ls -ct > /tmp/foo) This works fine when
I execute from the command line, but won't write anythingwhen started from initt
ab.
However, it will write a blank /tmp/foo if I place anything in the file while th
e process is sleeping.

Any ideas?   BTW It's a csh script. 

                                 Thanx,
 				   Benjy
From: fgodfrey@MAILBOX.SYR.EDU ("Francis N. Godfrey")
Newsgroups: comp.unix.questions
Subject: Locating "active" devices in the /dev directory...
Date: 1 Sep 92 14:30:30 GMT



>From: fgodfrey@rodan.acs.syr.edu (Francis N. Godfrey)
Newsgroups: comp.unix.questions
Subject: Locating "active" devices in the /dev directory...
Followup-To: E-mail ONLY!!!
Distribution: na
Organization: Syracuse University, Syracuse, NY
Keywords: 



I am on a machine (Sun workstation) that has a few devices attached to it 
physically. I know that there are links to them somewhere in the /dev
directory.

what I want to know: is there an utility that can scan /dev and report what
devices are active and what are their paths?

-------------------------------------------------------------------------------
Francis N. Godfrey |Computing_CENSORED_CENSORED_    |"Don't Tell Them
Syracuse University|Micro CENSORED_CENSORED_CENSORED| Anything!"-Marsh L. Law
FGODFREY@SUVM.BITNET"Disclaimers are useless, No.1"!|fgodfrey@rodan.acs.syr.edu
----------------+This space currently being re-evaluated+----------------------
Newsgroups: comp.unix.questions
From: root@candle.uucp (Bruce Momjian)
Subject: select()/poll() source code posting
Organization: a consultant's basement
Date: Tue, 1 Sep 1992 01:45:21 GMT
X-Newsreader: Tin 1.1 PL5

I have written an implementation of poll() and select() for systems that
lack them.  It is implemented as a device driver.  I have called it
pol() and selec() so as not to confuse them with the originals.  It only
works on reads and writes.

I have tested it using pcomm 2.0 and ptyshl with the PD pty driver.

The shar file is 17k.  My thanks to those people in comp.unix.internals
who helped me with some of the details.  This code was written by
looking at other PD device driver implementaions, like fas(async),
pty(ptys), herc(hercules graphics), and mouse(mouse).  

The code was developed on AT&T 386 Unix SVr3.1, which has poll(), but
only for streams.  

If you would like a copy, please mail me a request.

-- 
Bruce Momjian                      |  830 Blythe Avenue
root%candle.uucp@bts.com           |  Drexel Hill, Pennsylvania 19026 
                                   |  (215) 353-9879(w)  853-3000(h)

-- 
Bruce Momjian                      |  830 Blythe Avenue
root%candle.uucp@bts.com           |  Drexel Hill, Pennsylvania 19026 
                                   |  (215) 353-9879(w)  853-3000(h)
Newsgroups: comp.unix.questions
From: les@chinet.chi.il.us (Leslie Mikesell)
Subject: Re: How can I allow access to a subdirectory without risking other files?
Organization: Chinet - Public Access UNIX
Date: Sat, 29 Aug 1992 02:08:05 GMT

In article <92Aug26.165308.27634@acs.ucalgary.ca> barker@enel.ucalgary.ca writes:
>I know how to give group/other access to a subdirectory without risking my
>other files, however, I want people to be able to read/write to ANY file in
>the subdirectory. That includes files put there by other people.  The only way
>I know of to do this is to make sure that everyone has their umask set to 000
>when they are working in that subdirectory.

It sounds fairly dangerous to do this without any arbitration to keep
several people from writing to the same file at once.  Why don't you
just insist that each person copy a file before making changes?  Or
write a suid root program that does nothing but change the modes on
the files in that directory and make the users run that before writing
to any files.  Better yet, make the program also perform some kind of
file locking while each person is writing.

Les Mikesell
  les@chinet.chi.il.us
From: cracraft@rice-chex.ai.mit.edu (Stuart Cracraft)
Newsgroups: comp.unix.questions
Subject: return msgs from `at/atrun'
Date: 30 Aug 92 20:31:30 GMT
Organization: MIT Artificial Intelligence Lab


Is there any way to suppress the return messages from at/atrun
regarding output from at jobs? The job was submitted on a SUN
running 4.1.2 via

	at time shellscript

I would like not to receive any messages about output.

Any way to do it?

STuart
Stuart Cracraft
Toshiba America & Project GNU
Newsgroups: comp.unix.questions