HDTenEightyP/NetNews huggingface dataset:
From: gt7237a@prism.gatech.EDU (Matt Le Blanc)
Newsgroups: comp.unix.questions
Subject: Postscript files
Date: 27 Aug 92 12:37:44 GMT
Distribution: usa
Organization: Georgia Institute of Technology

Is there any UNIX command that will convert a postscript file to
a normal text file?  I would like to preview the postscript files
before printing them.  Thanks for any replies.
						Matt Le Blanc
From: guy@Auspex.COM (Guy Harris)
Newsgroups: comp.unix.questions
Subject: Re: A question on ls
Date: 30 Aug 92 01:13:02 GMT
Distribution: na
Organization: Auspex Systems, Santa Clara

>Not true, this should work in ALL shells:
>
>ls | grep -v '.Z'

Nope:

	bootme$ ls
	alakaZam
	bootme$ ls | grep -v '.Z'

Jim Davis's version is better; he suggested

	ls | grep -v '\.Z$'

The '\' in front of the '.' tells "grep" (or "egrep") that the "." isn't
a single-character "wildcard" that'll match any character, but is
supposed to match only the character '.'.  The '$' at the end tells
"grep" (or "egrep") that it's supposed to match stuff that has '.Z' at
the end, not stuff that has '.Z' in the middle.

That keeps it from matching "alakaZam", for example, which *does* match
'.Z'; the '.' matches the 'a' before the 'Z', and it doesn't care if the
'Z' is at the end.
From: fazc016@hq.dla.mil (Don Costello)
Newsgroups: comp.unix.questions
Subject: Re: need script to rename uppercase filenames
Date: 3 Sep 92 17:10:19 GMT
Organization: HQ Defense Logistics Agency/DASC, Cameron Station, VA
X-Newsreader: Tin 1.1 PL4

slix@svcs1.UUCP (Bill Miller) writes:
: Hi, everyone.
: 
: I'm fairly new to unix, and I need a script or procedure to do the following:
:  
: I have some source code in DOS (many separate files) that I tarred under
: DOS and untarred under 386BSD.  The big problem is that all the files
: came through in UPPERCASE and I need a script to mv (rename) them all
: to lowercase quickly.
:  
: Since they're in DOS text format, I realize I also need to strip the 
: extra carriage returns on each line.  I've been successful in doing this
: with:
:  
:   cat (file) | tr -d '\015' > (newfile)
:  
: It would be nice to combine both of these so that I could rename the
: files to uppercase and strip the extra newlines all in one fell swoop
: instead of doing it one file at a time.

  I'm assumming you want to rename the files FROM upper TO lower
  case...

  Use "tr" like you did above to change the filename.  The following works
  on BSD4.3:

     #!/bin/sh
     #
     for oldfname in *
     do
        cat $oldfname | tr -d '\015' > `echo $oldfname | tr [A-Z] [a-z]`
     done

  You still have to remove the "$oldfname" before you end.  I really
  don't think there is a way to do it all at once because you are
  reading the *contents* of the file and sending the lines, less the
  "^M", to a newfile (lowercase of the original).

  My suggestion for the future... PKZip the files on your PC, then UnZip
  (using Info-Zip "unzip") and the files will be lower case and the CR/LF 
  translated correctly.

  But then again, your question breeds shell practice... :-)).

  Cheers  -- dcc --
-- 
+------------------------------------+---------------------------+
| Don Costello, DASC-ZSC             |  It's hard to cram this   |
| DLA Cameron Station, VA            |  signature into just 4    |
| TEL: (703) 274-7215  AV: 284-7215  |  lines!!!                 | 
Newsgroups: comp.unix.questions
From: dlparker@dlpinc00.rn.com (David L. Parker)
Subject: Re: SPSS for unix, does it exist??
Organization: Automated Data Management Services
Date: Wed, 26 Aug 1992 10:04:28 GMT

In article <BtJyMp.Cow@acsu.buffalo.edu> blackman@acsu.buffalo.edu (Cancholech) writes:
>
>Does anyone know if SPSS the stats program for PC's and VAX is
>available for Unix systems?
>

Yes, it is.  Check out the Sept. 92 issue of UNIX World.
-- 
Dave Parker
Automated Data Management Services, Pleasant Hill, MO 64080-1331
(816) 987-5167/5218 voice/fax
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: How to determine user login time in minutes?
Originator: tchrist@pixel.convex.com
Date: Wed, 26 Aug 1992 20:12:50 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
Keywords: time, login, accounting
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 cosmo@cherry.ucsb.edu (Burtin;Boris;;;;COMS;Undergraduate;940630;911002;1000):
:I'd like to keep track of how long I've used the system.  This should be done
:in my .logout file.  I've played around with "last," but it won't give me the
:time for the _current_ session (it says "still logged in").  
:
:Is there a utility that I'm missing?  Or does someone know of a script 
:(preferably in Perl) that will figure out the login time?

If you have Cnews installed on your system, you can do this:

    #!/usr/bin/perl
    $GETDATE = '/usr/local/lib/news/newsbin/getdate';
    ($logtime) = `who am i` =~ /(\w{3}\s+\d+\s+\d+:\d+)/;
    printf "%.2f minutes\n", (time - `$GETDATE "$logtime"`)/60;

If you don't have C news, you can do a lot of other things, 
like you the getdate.pl produced from getdate.y by the perlian
byacc, or you can look at ttys and utmp to figure it out.
But this seems easiest to me.

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

"The number of UNIX installations has grown to 10, with more expected."
    - _The UNIX Programmer's Manual_, Second Edition, June, 1972.
Newsgroups: comp.unix.questions
From: bkb@cbnewsl.cb.att.com (brian.bebeau)
Subject: Re: Login Message
Organization: AT&T
Date: Mon, 31 Aug 1992 16:47:09 GMT

In article <1992Aug27.181110.19930@ssigate.ssinc.com> msc@ssigate.ssinc.com (Michael S. Cross) writes:
>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.
>
Actually, everybody who's responded to this is right. It depends on what
the original poster meant by "login screen". The actual login prompt
("login:" or "Please login:" or whatever) is generally found at the end
of the entry in /etc/gettydefs (all this is for SysV mind you). 
*Some* versions of Unix allow for an /etc/issue file. This is a flat ASCII
file with your own message. It's displayed *before* the login prompt.
Our product uses this as a proprietary warning message. It's usually
in the getty code within an ifdef, and the ifdef is hardly ever
defined when getty is compiled. You can try to make the file and if
it prints something out, you can use that. If it doesn't print anything
then the define wasn't defined when compiled and you can't use it.
The message-of-the-day (/etc/motd) is displayed *after* login. There's
usually a line in /etc/profile that says "cat /etc/motd". 

So it depends on what the original poster wanted, the login prompt,
a message before the login, or a message after the login.

-- 
=====================================================================
Brian Bebeau			Interactive Systems at AT&T-Columbus
brian@cblph.att.com   or   bkb@cbnewsl.att.com
=====================================================================
From: etxaha@eua.ericsson.se (Anders Hallberg)
Newsgroups: comp.unix.questions
Subject: vgrindef for makefile
Keywords: vgrind make
Date: 28 Aug 92 11:16:43 GMT
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden

Is there anyone out there that has made vgrindefs for makefiles?  If
there is, I would be very happy to receive a copy.

	/Anders Hallberg
Newsgroups: comp.unix.questions
From: jdavis@bordeaux.kpno.noao.edu (Jim Davis)
Subject: Re: A question on ls
Organization: National Optical Astronomy Observatories, Tucson AZ
Distribution: na
Date: Sun, 30 Aug 1992 00:01:42 GMT

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.

You're not out of luck if you remember about building UNIX commands out of
other commands.  ls, and grep with the -v option (to 'inVert' the sense of
the match) can be combined like so:

ls | grep -v '\.Z$'


-- 
Jim Davis            | "Knock it off, Uncle Owen.  Get an afterlife!"
jdavis@noao.edu      |   -- Clarissa Darling
From: rouben@math13.math.umbc.edu (Rouben Rostamian)
Newsgroups: comp.unix.questions
Subject: Re: need script to rename uppercase filenames
Date: 3 Sep 92 12:06:07 GMT
Organization: University of Maryland Baltimore Campus, Academic Computing Services

In article <1992Sep3.083107.11920@athena.mit.edu> benjy@athena.mit.edu (Benjamin B Thomas) writes:
>In article <699@svcs1.UUCP> slix@svcs1.UUCP (Bill Miller) writes:
>> 
>>I have some source code in DOS (many separate files) that I tarred under
>>DOS and untarred under 386BSD.  The big problem is that all the files
>>came through in UPPERCASE and I need a script to mv (rename) them all
>>to lowercase quickly.
>
>Try:
>
>#!/bin/csh 
>foreach i ($argv)
>setenv file $i
>cat $file | tr -d '\015' > `echo foo | nawk '{print tolower(ENVIRON["file"])}'`
>rm $file
>end

I would suggest the quicker script:

#!/bin/sh
for file in *[A-Z]*
do
mv $file `echo $file | tr '[A-Z]' '[a-z]'`
done

This script changes all files names containing an uppercase letter 
in the current directory to lowercase.  I would not strip the \015s
so casually without knowing the contents of the files.

--RR
From: exumfox@exu.ericsson.se (Mike Fox)
Newsgroups: comp.unix.questions
Subject: Re: Directory Name in Unix Prompt
Date: 1 Sep 92 23:07:53 GMT
Reply-To: exumfox@exu.ericsson.se
Organization: Ericsson Network Systems


I would suggest the .cshrc file instead of .login
and add these lines.

set HOST=`hostname`  
alias   cd           '\!:0-$; set_prompt'
alias   set_prompt   'set prompt = "'$HOST':${cwd} % "'
From: xcc@ira.uka.de (Thomas Weinstein)
Newsgroups: comp.unix.questions
Subject: unsubscribe
Date: 1 Sep 92 11:56:00 GMT

UNSUBSCRIBE INFO-UNIX
Newsgroups: comp.unix.questions
From: bryan@uhura1.uucp (Bryan Curnutt)
Subject: Re: Dear vi guru,
Reply-To: bryan%uhura1@uunet.uu.net
Organization: Stoner Associates, Inc./DREM Incorporated, Houston Texas
Distribution: na
Date: Thu, 3 Sep 1992 16:30:59 GMT

In article <1992Sep2.233330.18751@ncar.ucar.edu> tparker@music.scd.ucar.edu (Tom Parker) writes:
>In article <1992Sep2.224136.24163@nsisrv.gsfc.nasa.gov> schieb@shark.gsfc.nasa.gov (Brian D. Schieber) writes:
>>Dear vi guru,
>> 
>> I like to use tabs alot in just about every session of vi I
>>work with, It would be great if I had a macro or whatever that
>>could replace the tabs with the appropriate number of spaces
>>in a file WHILE in vi. Do you have such a macro?
>
>Check if your system has the 'expand' command.  This command converts
>tabs to spaces, and vice versa.

... but is not what Brian asked for.

Assuming your tabs are for indentation at the beginning of the line
only, i.e. that you don't have text characters followed by tabs,
something simple like

    :map g :%s/^I/    /g^M
[tab character]^^       ^^[carriage return]

will do what you want.

If your system does have the 'expand' command, then something like

    :map g :%!expand -4^M

will do the trick, and do it correctly (unlike the %s above, which
only works if the tabs are all at the beginning or coincidentally
aligned so they start at a tabstop).

There may be a simple way to correctly expand tabs from within vi
without resorting to external programs, but I'm not really a guru,
just a Joe Random User.
-- 
Any opinions above are mine, and do not necessarily reflect the views of SAI.
Bryan Curnutt
bryan%uhura1@uunet.uu.net
From: CHUCK@bkmain.poly-east-london.ac.uk (Chuck Foster)
Newsgroups: comp.unix.questions
Subject: awk problems
Date: 26 Aug 92 14:26:36 GMT

Is there any way to convert a string to lowercase/uppercase in awk scripts?
I've tried   x = strupr($1);  but this just seems to return a string as is.

Also, is it possible to find the offset of a token in the whole string? The
file I am operating upon is in fixed format, and a user's full name occurs
after column 68, for example. At the moment I have a small  for  loop that
copies each token into a variable:
    for (i = 8; i <= NF; i+=1) { name = name " " $i; }
but it would be nice to be able to extract the whole part from within $0 into
a variable, for example, or to be able to concat a range of tokens together
(in a similar why to   $(3 .. $NF)  or something.

Forgive my ignorance; I've only just begun to experiment with this
interesting command ... :-)
Newsgroups: comp.unix.questions
From: swolfson@nyx.cs.du.edu (Sabina Wolfson)
Subject: Re: 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: Fri, 4 Sep 92 02:34:43 GMT

In article <BtyyBr.68w@constant.demon.co.uk> slangley@constant.demon.co.uk (Simon Langley) writes:
>Sabina Wolfson (swolfson@nyx.cs.du.edu) wrote:
>: Or is there some way I can send a request to another name server 
>: (I know which namer server my site should be using)?
>: 
>my resolv.conf just says:
>nameserver 158.152.1.65
>
>and it uses this host as the nameserver.  However, there are other changes
>that may need to be made and these are system dependent.

One of the problems is that I don't have the correct access to be changing 
around these files (and I probably don't have anough UNIX knowledge either 
though it would be a lot of fun to try :)  However, as many helpful people
pointed out in e-mail, all I really needed to do was:

	nslookup <site-to-look-up> <name-server>

All done quickly and beautifully on the command line.

Sabina :)- sabina@cns.nyu.edu


Newsgroups: comp.unix.questions
From: dss@styx.desktalk.com (David S. Spencer)
Subject: subprocess doesn't receive SIGCHLD...process groups?
Organization: DeskTalk Systems Inc.
Distribution: na
Date: Tue, 25 Aug 1992 17:32:26 GMT

Quick summary: proc A starts B who starts C but B doesn't receive SIGCHLD when
C dies.

Explanation:

I have three programs:  "server", "worker", and "parent".

"server" listens for a TCP connection, starts "worker" when it receives the 
connection, waits for a SIGCHLD, and cleans up when "worker" finishes.
Everything here works fine.

"parent" is supposed to start child processes and restart them when they die.
If I have it run w/ "server", it starts up "server" just fine, who then
starts up "worker" when it is supposed to.  The problem is that "server" 
doesn't receive SIGCHLD anymore when "worker" dies - for that matter, neither
does "worker".  

Question: Why doesn't "server" receive SIGCHLD?

I suspected that it had to do w/ process groups, so I inserted what
I thoght was the correct code into "parent":

    if ( fork() == 0) {	/* Child half of fork. */
	if ( setpgrp( getpid(), getpid()) < 0) {
		perror( "setpgrp");
		_exit( 101);
	}
	/* Now exec "server" */
    }
    else {	/* Parent half. */
    }

But this doesn't change anything.  Any ideas?

Note: I'm running SunOS 4.1.2.

		Thanks,
			- Dave

-- 
----------------------------------------------------------------------
David Spencer		Desktalk Systems Inc.
dss@destalk.com
----------------------------------------------------------------------
Newsgroups: comp.unix.questions
From: schieb@shark.gsfc.nasa.gov (Brian D. Schieber)
Subject: Dear vi guru,
Reply-To: schieb@shark.gsfc.nasa.gov (Brian D. Schieber)
Organization: Oceans & Ice Branch, NASA/GSFC/GSC
Distribution: na
Date: Wed, 2 Sep 1992 22:41:36 GMT

Dear vi guru,
 
 I like to use tabs alot in just about every session of vi I
work with, It would be great if I had a macro or whatever that
could replace the tabs with the appropriate number of spaces
in a file WHILE in vi. Do you have such a macro?

Most graciously,
 Brian

p.s. please send all suggestions to switch to EMACS to /dev/null
From: slix@svcs1.UUCP (Bill Miller)
Newsgroups: comp.unix.questions
Subject: Re: Login Message
Date: 26 Aug 92 01:42:12 GMT
Organization: Silicon Valley Computer Society, Sunnyvale, CA


The login message is supposed to be found in /etc/motd.  motd stands for
message of the day, and you can edit that to whatever is appropriate. 
 
You probably need root access to do this though.
Newsgroups: comp.unix.questions
From: dtb@otto.bf.rmit.oz.au (David Bath)
Subject: Re: terminfo capname
Organization: RMIT Computer Centre, Melbourne Australia.
Date:  3 Sep 92 06:58:55 GMT

ssl20@RUTS.ccc.amdahl.com writes:

>What is the byte sequence for terminfo capnames 'cnorm', 'cvvis' and 'civis' for
>'ibm-pc' and 'vt100'?
i
It depends
cnorm is probably sgr0 ie \033[0m
civis is probably \033[8m
cvvis is probably \033[1m or \033[7m

========================================================================
David T. Bath
email: 	dtb@otto.bf.rmit.oz.au
Work: 	Global Technology Corporation, Carlton, Vic, OZ  (03) 3477511
=======================================================================
--
========================================================================
David T. Bath
email: 	dtb@otto.bf.rmit.oz.au
Work: 	Global Technology Corporation, Carlton, Vic, OZ  (03) 3477511
Newsgroups: comp.unix.questions,comp.unix.bsd
From: rg@msel.unh.edu (Roger Gonzalez)
Subject: SUMMARY:  What Unix HW/SW I will buy with my $8000
Organization: UNH Marine Systems Engineering Lab
Distribution: comp
Date: Sat, 29 Aug 1992 20:41:23 GMT


I wanted to buy a Unix box for home, and posted asking what I should buy for
$8000. 

I received well over a zillion and a half responses to my query.
"Buy a humpin' 486-50 PC and put Unix on it.." was 99% of the response.

The other 1% said things like:

- give up your desire for color and buy a monochrome NeXT
- suffer with low disk/mem <really-low-end-sun/dec/iris> until you have
  another $4000

Looks like I will probably buy a
- 50MHz 486DX2 EISA w/ SCSI, 8Mb, 340Mb, svga    ($3695)
- replace their monitor with NEC 5fg             ($1000)
- 1.2Gb disk                                     ($1200)
- 2.3Gb tape                                     ($1200)
- Dell Unix                                      ($1000)
  for now.. may try Solaris or NeXTstep or BSDI eventually

These are price guestimates.  If I have some left over, I'll save it up for a
Postscript laser.  Seems like bang/buck, this is the way to go.

Anyone have a similar setup?  I'd like to hear about your experiences..

-Roger

--
artificial flowers        pieces of plastic and metal, crudely fashioned to 
                          bear a limited, superficial resemblance to real
                          flowers, but with no credible attempt to match their
                          internal complexity in terms of form, function, or
                          behavior

artificial intelligence   really smart computers

Roger Gonzalez   -  rg@msel.unh.edu
Denning Mobile Robotics, Wilmington MA


Newsgroups: comp.unix.questions
From: jpr@jpradley.jpr.com (Jean-Pierre Radley)
Subject: Re: Communication program for Sun
Organization: Unix in NYC
Distribution: usa
Date: Tue, 25 Aug 1992 21:50:18 GMT

In article <1992Aug19.150349.25008@philabs.philips.com> kkt@philabs.philips.com (Kim-Kiat Tan) writes:
>	Is there a version of Waffle communication program for Sun using tip ?
>or is there any communication program like pcomm for Sun ? Most of the programs
>I knew are for unix on pc, but I would like to run it on Sun.
>

XC runs on Suns. The latest release is stuck in that famous queue in c.s.u.
I'm considering posting to alt.sources instead.

Mailing of the shar files is still something that I do when asked,
however.
-- 
Jean-Pierre Radley   Unix in NYC   jpr@jpr.com   jpradley!jpr   CIS: 72160,1341
Newsgroups: comp.unix.questions
From: benjy@athena.mit.edu (Benjamin B Thomas)
Subject: Problems using inittab
Organization: Massachvsetts Institvte of Technology
Date: Thu, 3 Sep 1992 08:49:41 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/)
but doesn't work right.

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

Any ideas?   BTW It's a csh script.

					-Benjy
Newsgroups: comp.unix.questions
From: zzang@whale.uucp (Zhuo Zang[~{j0WA~}])
Subject: What does \!* mean in csh history subst ?
Organization: University of Florida
Distribution: usa
Date: Wed, 2 Sep 92 17:30:37 GMT

Hello,
I am confused by the meaning of the
csh history substitution \!* .
the man says it means: take word 1-$ from previou cmd. 
my question is: if the previous cmd have pipes, like
> cat foo.1 | lpr
what is the 1-$ ? if you use:
>more !*
?: 1-$ is foo.1 or foo.1 |lpr

similar question also can be raised when we use the 
semicolon `;' in the previous cmd .
my guess is \!* will ignore whatever after the `|' or `;'
then what can I do if sometimes I really want
\!* to include the stuff after the `|' or `;'

Many thanks !


-- 
Zhuo Zang[~{j0WA~}]
Department of Statistics
University of Florida            Email: zzang@stat.ufl.edu
From: vincent@orville.psu.edu (James Vincent)
Newsgroups: comp.unix.questions
Subject: Help Please with Strange Job Priorities
Date: 31 Aug 92 17:36:43 GMT
Organization: Penn State University, Center for Academic Computing


	One user on our SGI systems is given a job priority of 24 for all
	jobs submitted. The default for every other user is 20. We cannot
	find any reason for this, nor can we seem to change it. Does anyone 
	know why this might be happening?
	There are no nice or renice commands in the users .cshrc or .profile
	files. The user uses th Bourne shell. There are no priorities set
	in the passwd file (like prio=#) for this user or any user on the
	system. After submitting a job the user typically changes the priority
	to 20 by logging in as root. This is not an ideal solution. Any 
	suggestions would be greatly appreciated.

				Jim Vincent
				vincent@retina.chem.psu.edu
Newsgroups: comp.unix.questions