HDTenEightyP/NetNews huggingface dataset:
From: manmetha@gauss.rutgers.edu (Rajesh Malhotra)
Newsgroups: comp.unix.questions,comp.unix.aix
Subject: Non blocking reads from stdin
Keywords: non blocking getchar()
Date: 19 Nov 92 16:24:22 GMT
Followup-To: comp.unix.aix
Organization: Rutgers Univ., New Brunswick, N.J.


Fellow Netters,

	How would I do a nonblocking read on stdin.

i.e have getchar() to be nonblocking in case there is no input.
I can implement this by having an alarm go off after a timeout and then
continue. 

	But is there an ioctl command that would do non-blocking i/o?
I tried

	ioctl(fileno(stdin), FIOBNIO, 0)

but it does not like the FIONBIO command and I get an EINVAL errno.
Any insight on this matter?

BTW, I am running AIX 3.2 on an IBM RS6000.

Any and all responses would be greatly appreciared.

Thanx,

Raj.
-- 
===============================================================================
  __  __     .
 /   __/    /                               Raj Malhotra.
/   ( /_   /                                voice : (908)613 4313. 
        __/                                 email : manmetha@gauss.rutgers.edu

===============================================================================
Newsgroups: comp.unix.questions
From: jns@ace.nas.nasa.gov (John N. Stewart)
Subject: Re: UUENCODE help!
Organization: NAS, NASA Ames Research Center, Moffett Field, California
Date: Mon, 16 Nov 92 23:59:42 GMT
Distribution: usa

In article <gf0hoqi00iUyE6umUp@andrew.cmu.edu> jd4q+@andrew.cmu.edu (Joe Eddy Demers) writes:
>To get uuencode to work right, do the following:
>
>Say you want to uuencode the binary file blah.mid into the text file blah.uu:
>    At the unix prompt, type:
>        uuencode blah.mid blah.mid > blau.uu
>
>I know that sounds weird, but it works.  I'm not sure why you have to
>put the source filename as both the desired file AND the remote file,
>but that's the only way I've been able to get it to work, and it works
>just fine that way.



It allows you to specify that the "outgoing" file be named something
different (which by the way, can actually be quite dangerous. Be very
careful about uudecoding anything as root)

So "uudecode %real-file% %when-it-gets-decoded-give-it-this-file-name% \
    > %put-the-encoded-stuff-in-here%"

--Ace

Xref: sparky comp.unix.questions:13613 comp.unix.misc:4252
From: ken@sugra.uucp (Kenneth Ng)
Newsgroups: comp.unix.questions,comp.unix.misc
Subject: Re: Unattended execution
Date: 19 Nov 92 03:39:26 GMT
Organization: Private Computer, Totowa, NJ

In article <BxsH17.Cuu@magpie.nycenet.edu: manes@magpie.nycenet.edu (Steve Manes) writes:
:Bob Lee (rlee@bgsu.edu) wrote:
:: There is a task I want to perform, it includes recursively searching over
:: 200 directories and over 1000 files for an occurance of a text string in
:: any of the files. As you probably guessed, this task takes quite a while
:: and I want to do it for more than one text string.
:See at(C).

At on my machine will schedule a task to run at a certain time.  I had a real
dangerous script that looked for printable files, greped out a string, and
than ran sed to replace all occurrance of that string with a new string.
Real dangerous if some novice decides to change all 'a' to 'b' :-).  The
relevant part of the code is:

gfind . -type f -print | xargs printable | xargs grep "stuff" \
| awk -F: '{ print $1 }' | sort | uniq

Now, what this does in english :-).  gfind finds all files I want to deal
with, modify to your hearts content.  'printable' was a local function to
determine what files one wanted to look at (it ignored object code, data
bases, etc), the grep searches for the string I want, the awk yanks out
the file name, the 'sort | uniq' gives me a unique list of the files that
contain the string.  And for the curious, this is the program I piped the
output into to change all the strings (from memory):

#! /bin/csh
foreach file ($*)
   cp ${file} ${file}.save
   sed 's/old/new/g' < ${file}.save > ${file}
   end

Be warned, this routine can be VERY dangerous if you are not real careful
about what you want to change.


-- 
Kenneth Ng
Please reply to ken@eies2.njit.edu for now.
Apple and AT&T lawsuits: Just say NO!
From: tma@encore.com (Thanh Ma)
Subject: Re: UNIX book worth $46 . . ? 
Organization: Encore Computer Corporation
Date: Mon, 23 Nov 1992 14:21:19 GMT

peer@ccrma.stanford.edu (Peer Landa) writes:


>I'm considering purchasing a new UNIX book called "Advanced Programming in the  
>UNIX Environment" -92 by Richard Stevens on Addison & Wesley.  Does anyone on  
>the net own this book, who can pass me a hint if its not worth $46 . .
>Thanks

>peer@ccrma.stanford.edu

BookStop sells it for 49.95 but you can get 10% discount if you are a member.
Good book.
Newsgroups: comp.unix.questions
Subject: how to create fs on HARD PARTITION?
From: <AASSI@CUNYVM.BITNET>
Date: Monday, 23 Nov 1992 14:39:55 EST
Organization: City University of New York/ University Computer Center

I'm running UNIX VR3.2.2/386 with a 330MB ESDI drive. During installation
I partitioned the HD to 30MB DOS, 270MB UNIX, and 30MB spare.  After
installation I looked at /etc/partitions and all it contains is info
about the "SOFT" partitions that UNIX created.

Can someone please tell me "EXACTLY" what the commands needed to make a
filesystem in the "spare" HARD PARTITION under AT&T unix Vrel 3.3.2?

PS: I read a lot of generic posts regarding similar situation (ex. "use mkfs
then labelit and voilla..") Please be specific.


Thanks in advance


Abraham Abou-Suleiman          AASSI%CUNYVM.BITNET@cunyvm.cuny.edu
Director of Data Processing
United Cerebral Palsy Associations of New York State
330 West 34 Street
New York, NY 10001
Newsgroups: comp.unix.questions
From: bad@flatlin.ka.sub.org (Christoph Badura)
Subject: Re: What's wrong with select() ?
Organization: Guru Systems/Funware Department
Date: Thu, 19 Nov 1992 23:59:07 GMT

In <pat.722210144@bcserv> pat@bcserv.wustl.edu (Niemeyer (Pat)) writes:

>	got = select (1, &fdset, NULL, NULL, &timeout);

From select(2):

	  nfound = select(nfds,	readfds, writefds, exceptfds, timeout)
...
	  The first nfds descriptors are checked in
	  each set; i.e. the descriptors from 0 through nfds-1 in the
	  descriptor sets are examined.

This means that if you want to check fd 6 with select(2) the first
parameter has to be at least 6.

-- 
				Christoph Badura  ---  bad@flatlin.ka.sub.org

AIX is a better... is a better...  is a better... OpenSystem.
					IBM Rep at GUUG Symposium '92
Newsgroups: comp.unix.questions
From: krej@electrum.kth.se (Kristian Ejvind)
Subject: Re: How do I increase number of screen rows?
Organization: The Royal Institute of Technology, Stockholm, Sweden
Date: Sun, 15 Nov 1992 17:21:08 GMT

In article <lux.721768908@sol.UVic.CA> lux@sol.UVic.CA (Michael O'Henly) writes:
>       I want to increase the number of rows displayed by things like
>   emacs and nn from 24 to 35.
>
>       When I dial into my machine, the terminal window is defined as
>   24x80 and I can't quite figure out how to change it. I suspect it
>   involves the stty command, but 'stty rows 35' doesn't seem to tell
>   "full screen" emacs whatever it needs to know in order to address the
>   extra rows.

   IF you are using tcsh (I don't know how any other shells do this) the
problem surely is in tcsh, as it uses the scroll regions of a vt100-terminal.
I had the same problem and have solved it with a little script that sends the
'set scroll-region' command to the terminal like this:
------8<----cut,cut-----
stty rows 29 cols 80
echo -n "<ESC>[1;29r"
clear
------8<----cut,cut-----
where <ESC> is the escape character, which sets the display to 29 lines, 
just substitute 29 for 35 on the first two lines and it will work for you.

/Kristian
Xref: sparky comp.unix.questions:13761 comp.unix.sysv386:16700
From: rahardj@ccu.umanitoba.ca (Budi Rahardjo)
Subject: Re: IS UNIX DEAD?
Organization: University of Manitoba, Winnipeg, Canada
Date: Wed, 18 Nov 1992 19:51:35 GMT

papresco@undergrad.math.waterloo.edu (Paul Prescod) writes:

>>>Because that often saves (a lot of) money.
>>
>>I doubt it. If you insist to install the OS yourself then you better
>>start learning how manage it.

>No, no, no, no, no....OS/2, Windows, DOS etc. have PROVED that you don't
>have to be a system administrator to install an OS.  

Ever heard a user got confused using FDISK and trashed his partition 
and don't know what to do ?
Ever tried to install different mouse driver for windows and make windows
hang ? How do you fix it ?

>Why do you insist on
>this dogma "if you aren't computer literate enough to install Unix, you
>should pay someone to do it."  

Why not ? I've seen people buying PC with DOS and Windows installed, same
with UNIX. These people don't want to know how to install DOS or Windows.
(I know some people who don't know how to install DOS and Windows, all
they really care is Word Perfect.)
Also some company will sell you the machine with UNIX pre-installed.

>Why not make unix easy enough to install
>that you don't have to do either?  

Several people have pointed out that installing UNIX was easy.

-- budi
-- 
Budi Rahardjo <Budi_Rahardjo@UManitoba.Ca>
Unix Support - Computer Services - University of Manitoba
Newsgroups: comp.unix.questions,comp.unix.misc
From: ahoekstr@cs.utwente.nl (Andre D. Hoekstra)
Subject: Re: UNIX TRIVIA QUESTIONS -- revisited
Organization: Twente University, Dept. WB/WA (NOT cs)
Date: Mon, 23 Nov 1992 12:59:38 GMT

In article <1992Nov21.142914.45012@kuhub.cc.ukans.edu> yvonne@kuhub.cc.ukans.edu writes:
>
>Some people have written saying that the AT&T 3B2 
>running Unix System V Release 3.2 does not have job control.
>However, it does let me run jobs in the background.  Doesn't
>it make sense that if it allows me to run a job in the background,
>that there would be some way to get it back to the foreground?

It makes sense to me indeed.
(BTW: Job control is something of the shell. fg and bg are C-shell specific.)

>Maybe not...
>
>	-Yvonne

Andre--
-- 
There is no reason for any individual to have a computer in    | Andre Hoekstra
their home. (Ken Olson, Ex-President Digital Equipment, 1977)  | Enschede -- NL
From: rudolph@unixg.ubc.ca (Christopher E Rudolph)
Newsgroups: comp.unix.questions
Subject: How to get the size of a file??
Date: 23 Nov 92 06:55:47 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Summary: Can anyone tell me what command will give me the size of a file
Keywords: file size ls dir

Hello, I am new to unix stuff, and yes I have read alot of the FAQ, but I
haven't been able to find anything that tells me how to view the size of
file when I list the contents of a directory.

The unix version is V on a Sun Server.

any help is appreciated

Chris Rudolph  <rudolph@unixg.ubc.ca>

Newsgroups: comp.unix.questions
From: gordon@osiris.cso.uiuc.edu (John Gordon)
Subject: Re: A few more quick C questions...
Organization: University of Illinois at Urbana
Date: Sun, 15 Nov 1992 17:48:18 GMT

cecchinr@hornsby.cs.rpi.edu (Ron Cecchini) writes:

>Hi again -

> Thanx to everyone who responded to my read/write question of a few days ago.

> I just have a couple of *quick* C questions:

>1) Is there a command to see if a file exists?
>   [Can't just use fopen() - it returns NULL for more than one reason...]

	Try access().

>2) Is there a command to determine a file's size?
>   [I think the data structure pointed to by a FILE contains a ->_cnt feild
>    that can be used - I'll try it in a minute...]

	Try fstat(), in particular the st_size element.

>3) Is there a command to determine if a user is logged in?
>   [I don't want to bother with a system("who | grep user > temp"), etc.]

	Well, if you REALLY wanted to avoid the "who" route, you could
write a program that reads the /etc/utmp file, which is supposed to
contain a list of current users.  The format is pretty weird, though.

>4) Is there a command to determine if a user is running a certain process?

	Err....how about "ps" ?

---
John Gordon                        My incredibly witty saying has been 
gordon@osiris.cso.uiuc.edu         Politically Corrected into oblivion.
From: kzhan@sgi1 (Kaijun Zhan)
Newsgroups: comp.unix.questions
Subject: can't kill the process
Date: 21 Nov 1992 01:01:35 GMT
Organization: Department of Mathematics & Statistics, Univ. of Guelph
NNTP-Posting-Host: sgi1.mathstat.uoguelph.ca
X-Newsreader: TIN [version 1.1 PL6]


 I can't kill a process, say pid1234 with no terminal assocated. Even I use
while to repeat killing. I don't know how to stop such a process.

If this is an faq, accept my apologize.
--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        
 KAIJUN S. ZHAN                          || (519)824-4120 Ext. 8325/6558        
 Internet:kzhan@sgi1.mathstat.uoguelph.ca||                                     
 Internet:kzhan@sgi2.mathstat.uoguelph.ca|| "Three generates everything".       
 Internet:gilwf16@vm.uoguelph.ca         ||                                    
                                         ||      -- Lao Zi (Old Man)
                                         || Comment: no comment.          
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: lukeh@gnumath.rutgers.edu (Luke Higgins)
Newsgroups: comp.unix.questions
Subject: file .fingerees
Date: 17 Nov 92 13:56:41 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


I have found a program which attempts to execute a file when you are
fingered and I am having problems getting it to work.  My problem is
that on my system I can't seem to find the .fingerees file.  Is this
a standard unix file and if so how do I go about finding it.
	Thanks
	Luke  (a computer novice  to say the least)
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: Can telnetd preserve environment ? Can I get one that does ?
Date: 18 Nov 1992 22:48:53 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com
Keywords: telnetd, environ

In article <1992Nov18.191831.12729@uts.uni-c.dk> fekoprt@uts.uni-c.dk (FEK print) writes:
>Maybe im doing this the wrong way; Can I get the sources for a telnet that
>will report it's IP-adresse. and perhaps make it available for the subsequent
>processes?

You can get telnetd from ftp.uu.net and any other archive servers that
contain the free BSD sources.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Xref: sparky comp.unix.questions:13902 comp.unix.shell:4850
Newsgroups: comp.unix.questions,comp.unix.shell
Subject: Re: How does one log finger info ?
From: dave@cs.arizona.edu (Dave Schaumann)
Date: 24 Nov 92 00:23:43 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Followup-To: comp.unix.questions
Distribution: comp
Organization: University of Arizona
Keywords: finger/shell script

In article <munish.722552144@eustis>, munish@eustis (Munish Jain) writes:
>How does one log information about who is "finger"ing me\
>and when ?

You know, I've only been reading this group for about a month now,
but one thing is abundantly clear: this belongs on the canonical
list of all-time frequently asked questions.

Which leaves me puzzled.  Why should anyone care who fingers them?
I mean, e-mail is surely superior for two-way communication.

Presumably you finger someone to find out one of several things:
  - are they logged on?
  - how long has it been since they read mail?
  - when do they plan to be out of town?

And coming in a distant fourth in importance (IMHO), but certainly
first in popularity (if .plain file contents are any indication):
  - find out what sort of foolishness the fingeree considers
    clever, witty, and/or inspirational.

-- 
Yeah, right.
Newsgroups: comp.unix.questions,comp.unix.sysv386
From: danson@lgc.com (Doug Anson)
Subject: Re: How does a mortal become a UNIX WIZARD ?
Organization: LandMark Graphics Corporation LGC
Date: Mon, 23 Nov 1992 18:51:38 GMT

In article <1992Nov23.170207.20836@sci34hub.sci.com>, gary@sci34hub.sci.com (Gary Heston) writes:
|> .... 
|> You're a Unix Wizard when you can correct either Kernighan or Ritchie on
|> a kernel matter, and be right.
|> 
|> Until then, forget it....

Or, when you can build Unix from scratch... (i.e. Linux or 386bsd).  
Hmm.. I guess then you'd be called a "Unix-like" wizard :) :) ;)

Have a nice day!
Doug
-- 
-------------------------------------------
Doug Anson					
Internet: danson@lgc.com			
Phone:	  713.560.1274
FAX:	  713.560.1277
SNAIL:    Landmark Graphics Corporation LGC	
	  15150 Memorial Drive
	  Houston, TX 77079			
-------------------------------------------
From: peter@global.hacktic.nl (Peter Busser)
Newsgroups: comp.unix.questions
Subject: Re: IS UNIX DEAD? (long)
Date: Sun, 22 Nov 1992 15:41:00 GMT
Organization: Global Village 1

rahardj@ccu.umanitoba.ca (Budi Rahardjo) writes:

>>>Anyway I don't think it is very fair to compare vi and winword. One is a 
>>>text editor created to edit mostly C sources the other is a word processor 
>>>with graphic capabilities.

>>I agree with that, compare it for instance with OS/2's E.EXE or Windows'
>>NOTEPAD.EXE. They're very limited, but very easy to use.

>That's not fair either. Compare it with "textedit" (or crisp) under
>Openwindows.

No, because crisp isn't delivered with the system. E.EXE and NOTEPAD.EXE are
editors, like vi and are delivered with the system, like vi. But they are
easy to use but rather limited, unlike vi.

>>That's not the case for the PC terminal emulators I know. Most use some kind of
>>ALT combination.

>I thought F1 is supposed to be a standard HELP key for Dos/Windows programs :-)

Yes, but there is a good reason to deviate from the standard here.

Newsgroups: comp.unix.questions,alt.cobol,alt.folklore.computers,alt.religion.computers,comp.lang.pascal
From: frankj@ifi.uio.no (Frank Tore Johansen)
Subject: Re: net.views - mainframe programmers in an open systems world
Reply-To: frankj@ifi.uio.no
Organization: University of Oslo, Norway
Date: Sun, 15 Nov 1992 19:29:40 GMT
Originator: frankj@yrsa.ifi.uio.no


In article <BxrDxF.Izy@NeoSoft.com>, peter@NeoSoft.com (Peter da Silva) writes:
> In article <1992Nov4.173720.22157@tandem.com> Don Nelson <nelson_don@comm.tandem.com> writes:
> > I'm having a little trouble understanding the question.  Perhaps you 
> > could explain in 25 words or less why mainframe programmers differ from 
> > programmers in "the open world" (which is definitely not as open as some 
> > people think).
> 
> Mainframe programmers are used to working in sweatshop conditions, and will
> eat the lunch of us little hothouse roses unless we quit playing around on
> netnews and start taking end-users seriously.

That was 31 words 8)
Are you the right person to say that about news... 8)

> Seriously.

OK, then.  Has anyone ever researched in how much time is wasted
reading/posting news compared to what is gained from it?

-- 
% Frank T. Johansen % Have you shot your wolf today?
(T,'''$T$<.'^L   I'''''''9!$O&$R   !2)24 24 scale newpath/P true
def 2 21 moveto{dup 36 eq{pop/P P not def}{dup 7 and 4 sub exch 56 and 8 div 4
sub P{rlineto}{rmoveto}ifelse}ifelse}forall stroke showpage %        *BOOM* 8)
From: partl@hp01.boku.ac.at (Hubert Partl)
Newsgroups: comp.unix.questions
Subject: Re: Recursive directory listing
Date: 20 Nov 92 09:16:08 GMT

> Hi -- I'd like to get a recursive directory listing, similar to what TREE
> does in MS-DOS.  The FAQ list I consulted gives 3 options:
>         ls -R
>         find . -print
>         du -a .
> However, none of these work as I would like; I want to see directories
> only, NOT files.

          du .
(without the -a option) will give you directories only.

--
Dr. Hubert Partl                              Mail:  partl@mail.boku.ac.at
EDV-Zentrum, Universitaet fuer Bodenkultur    Phone: (+43 1) 36 92 924 - 233
Nussdorfer Laende 11                          Fax:   (+43 1) 36 92 924 - 200
A-1190 Wien, Austria                          (-:  Make laugh, not war!  :-)
Newsgroups: comp.unix.questions
From: andy@research.canon.oz.au (Andy Newman)
Subject: Re: IS UNIX DEAD (long)
Organization: Canon Information Systems Research Australia
Date: Mon, 16 Nov 1992 23:44:31 GMT

papresco@napier.uwaterloo.ca (Paul Prescod) writes:
>
>True, the problem is there are people, in this very newsgroup, who see
>no reason to try to make user friendly applications for unix.  To them,
>if you can't use VI right off the bat, or enjoy learning obscure, 
>nonsensical, illogical keystrokes, you should go back to the mac.
>THIS will kill Unix.
>

Define "user friendly". Aren't the people who like vi users too?

-- 
Andy Newman (andy@research.canon.oz.au)
From: kevin@alsvid.une.edu.au (Kevin Pollard)
Newsgroups: comp.unix.questions
Subject: Re: IS UNIX DEAD?
Date: 20 Nov 92 02:49:18 GMT
Organization: University of New England - Northern Rivers (Lismore)

> IS UNIX DEAD?
	No
-- 
Kevin Pollard			Internet:	kevin@alsvid.une.edu.au
Programmer/Analyst		Phone:		+61 (066) 203969
Registrar's Division - University of New England, Lismore NSW 2480 Australia
Newsgroups: comp.unix.questions
From: papresco@undergrad.math.waterloo.edu (Paul Prescod)
Subject: Re: IS UNIX DEAD
Organization: University of Waterloo
Date: Mon, 23 Nov 1992 08:57:52 GMT

>A system that does everything for everyone is suffering from what is called
>creaping featurism. Most systems which suffer from that (many popular DOS apps
>like e.g. WP, PC-TOOLS, etc.) are big, slow and hard to use. Another problem
>is that different users have different needs. So called end-users run
>applications and (often) don't need a powerful shell with pipelines, I/O
>redirection, and cryptic commands.


Word for windows can do anything that WordPerfect, VI or Emacs can do,
and yet the interface is crystal clear and easy.

Newsgroups: comp.unix.questions,comp.unix.sysv386