HDTenEightyP/NetNews huggingface dataset:
From: rjq@phys.ksu.edu (Rob Quinn)
Newsgroups: comp.unix.questions
Subject: Re: question on fscanf
Date: 24 Jan 1993 11:06:27 GMT
Organization: Kansas State University
NNTP-Posting-Host: bohr.phys.ksu.edu

In <1993Jan22.180730.1@vax1.umkc.edu> srinivasan@vax1.umkc.edu writes:

 Mail to you bounced. 

In comp.unix.questions you write:
>       Thanks a lot for  all the people who responded to my question.
>I am rephrasing the question now since i found that the fopen command
>si returning a valid pointer but when i do a fscanf on the file utmp
>(path = /etc/utmp) then it gives a segmentation fault. Can someone 
>explain this phenemenon.

 Yes, your program is broken.
 What more can we say with what you have given?

>thank you

 But, some ideas. When I do a 'wc -l' on my /etc/utmp I see that
it has 0 lines. That means there's no terminating \n. utmp is a
binary file. What do you expect to be able to scan out of it?
I would bet you are scanning some huge string into a small array.
Did you look at the utmp man page? If I were scanning utmp, I would
use open/read/close rather than stdio.

--
|                                                                   Rob Quinn |
|                                                            rjq@phys.ksu.edu |
|                                                       QuinnBob@KSUVM.BITNET |
Newsgroups: comp.unix.questions
From: raj@grok101.ColumbiaSC.NCR.COM (0000-Admin(0000))
Subject: Re: Spell checker from inside vi
Organization: Your Organization Here
Date: Wed, 27 Jan 93 14:57:37 GMT

In article <1993Jan26.170105.4573@doug.cae.wisc.edu>, saunders@luther.che.wisc.edu (Brian E. Saunders) writes:
|> In article <C1HD54.Iv@news.udel.edu> william@bach.udel.edu (Wild William) writes:
|> >Is there a simple way to do spell checking on the current file from
|> >inside vi?
|> >
|> >i tried {!}spell but strange codes show up and it doesn't show any
|> >alternatives etc.
|> 
|> I can pipe the lines through spell by going to the command line and typing
|> "1,$!spell", but unfortunately the output replaces all of your lines!  Does
|> anybody know how to redirect the output to the bottom of the file you are
|> currently working on?  This should be easy, but I don't know how to do it.
|> -- 
|> 
|> Brian E. Saunders			saunders@luther.che.wisc.edu

Brian & William,

You can try the following on the command line of vi:
:!spell % >> %

This will append the output of the command "spell" to the eof.
The "%" means the current file that is being edited.
-raj
1/27/93
Newsgroups: comp.unix.questions
From: jhgreen@cs.sandia.gov (Jethro H. Greene)
Subject: Would someone please mail me a ~/.exrc?
Originator: jhgreen@cs.sandia.gov
Organization: Sandia National Laboratories, Albuquerque, NM
Date: Tue, 19 Jan 93 04:56:59 GMT

Thanks in advance.

-- 
Jethro H. Greene
Massively Parallel Computing Research Laboratory,
Sandia National Laboratories, Albuquerque, New Mexico

Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: How to recognize a csh var as a number?
Originator: tchrist@pixel.convex.com
Date: Fri, 22 Jan 1993 23:56:25 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 ttsai@crhc.uiuc.edu (Timothy Tsai):
:I am reading string values into a csh variable.  Depending on whether each
:string represents a number or not, I want to do certain things.  How do I test
:to see if the variable string is a number or not?

Step 0: choose a real programming language.
Step 1: that done, now ask again.

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


Emacs is a fine operating system, but I still prefer UNIX. -me
Newsgroups: comp.unix.questions
From: champion@cch.coventry.ac.uk (Alun)
Subject: Re: So what _is_ so good about vi?
Organization: Coventry University, Coventry, UK.
Date: Fri, 22 Jan 1993 17:06:49 GMT

In article <1993Jan18.223845.10225@ucsu.Colorado.EDU> radinsky@spot.Colorado.EDU (Wayne Radinsky) writes:
~
~PS Anyone know why "s" is used as an equivalent for "c "?

I thought "s" meant swap(replace) character with some text.
In this I thougt it was similar to "r" replace, which replaces a character
with another character.

I can't be sure as I don't like vi.
There is just one command in vi I wish I had in emacs and that is "." - repeat
last command.

  -Alun
  
-- 
  *I'm as bad as the worst - but thank God(?) I am as good as the best.*
    *People who think they know everything annoy those of us that do.*
A.Champion                |  That's an interesting point, in the sense of
(champion@uk.ac.cov.cch)  |    being very not interesting at all. - The Liar
Newsgroups: comp.unix.questions
From: larry@sdf.lonestar.org (Larry D. Clark)
Subject: ksh prompt
Organization: sdf full-shell Public Access Unix - Dallas, TX - 214/436-3281
Date: Thu, 21 Jan 1993 12:04:14 GMT

	Netlanders

	I am using ksh on a platform running Unix 5.4 at work and would 
	like to have my PS1 to reflect the current working directory.
	Does any one have any ideas how to do it??

	If this is a faq please tell me where to get the faq.

	Thanks

	Larry

     Larry D. Clark   larry@sdf.lonestar.org  ...!seas.smu.edu!letni!sdf!larry
-- 
Larry D. Clark   larry@sdf.lonestar.org  ...!seas.smu.edu!letni!sdf!larry
From: dsc9hmr@bumed10.med.navy.mil (H. Mike Rice)
Newsgroups: comp.unix.questions
Subject: XMODEM 3.10 ... ??
Date: 26 Jan 93 21:05:58 GMT
Distribution: comp.unix.questions
Organization: elf____electronic learning facilitator, inc

Hey Folks,

Today, in search for a replacement to kermit, I compiled XMODEM 3.10.
I have used XMODEM for the past several years, however, UNIX Transfers
have always been via Kermit or FTP.  XMODEM compiled fine with changes
to meet the needs of SVR3.  However, I have discovered a frustrating
little quirk .... which may be my own ... this is why I'm asking  ;-)

XMODEM pads ... right ?

However, in a binary transfer, the resulting file length should match
its original .... right ??  wrong ??

Passing a 914 byte WordPerfect 5.1 file up to my 3B2, in binary mode,
results in a file of 1024 bytes, padded with ^Z's.  It's intuitively
obvious that the packet size must be maintained, however, binary 
transfers should never ... NEVER ... change the contents of a file.

Then, under emacs, I removed the ^Z's to return the file back to the
914 byte size.  Xmodem'd it back to the pc (PCPLUS) and it padded
again to 1024.  

I'm confused, simply because I have used XMODEM for PC to PC transfers
for a long time and have never had a binary file compromised before.

Please, if you have a thought, share it.  If I should abate XMODEM
binary transfers to UNIX, thats fine.  I don't want to walk away from 
this without understanding why.

Thanks,

-- rice  

--
|                    H. Mike Rice    |    elf_______________________
| |  dsc9hmr@bumed10.med.navy.mil    |         Empowerment through
|_|_____    rice@access.digex.com    |             Education !
  |_______                           |______________________________
From: ELLIOTT1@ccf2.nrl.navy.mil (ANDRE S. ELLIOTT)
Newsgroups: comp.unix.questions
Subject: Help !!!
Date: 26 Jan 93 14:53:14 GMT

Hello,

  Could someone please send me the address to the INFO-UNIX subsciption
list. Thanks in advance.

                                 Andre S. Elliott
                                 [elliott1@ccf.nrl.navy.mil]

Newsgroups: comp.unix.questions
From: woods@robohack.UUCP (Greg A. Woods)
Subject: Re: So what _is_ so good about vi?
Organization: Elegant Communications Inc.
Date: Mon, 25 Jan 93 02:03:55 GMT

In article <7245@m1.cs.man.ac.uk> murphy@vtx.ma.man.ac.uk (Malcolm Murphy) writes:
> Personally, I prefer vi to Emacs because
> 
> 1.  The command sequences that I use a lot are easier to remember

Matter of opinion, I've found....

> 2.  I don't really need everything that emacs has

Maybe not today....

> 3.  Things I need like special configurations for TeX, fortran, shell scripts etc
>     I can do myself and I know _exactly_ what they are going to do

So turn off all the magic -- ah sorry, "electric" modes.

> 4.  I like being rebellious - everyone else uses emacs :-)

I wish!  :-)

> If you ask me, emacs is TOO clever.  Now, micro-emacs is a different matter, but
> they don't have that here....   (boo)

Whoa!  Wait a minute here.  If you're talking about small emacs
"clones" in general, then I think you're looking at things wrong.  The
real benefit of emacs is that it's so maleable.  The "micro" clones
usually lack an integral extension language, and are only of an
advantage where "the real thing" is not usable.

BTW, I'm not a fan of the "Microemacs", and I seriously suggest you
look at some of the other clones, such as my favorite, Jove.
-- 
						Greg A. Woods

woods@robohack.UUCP, woods@Elegant.COM  VE3TCP	UniForum Canada & ECI
+1 416 443-1734 [home] +1 416 362-XRSA [work]	Toronto, Ontario; CANADA
Newsgroups: comp.unix.questions
From: pmd@cs.city.ac.uk (Paul M Davis)
Subject: dll's
Summary: How do dll'd work on solbourne??????
Keywords: dll
Organization: City University
Date: 27 Jan 93 17:26:38 GMT

A call to a func. in a dll indirects through a location on
the data segment, and only those functions called in the
program are given a location to indirect through.

BUT, how are locations of functions chosen?

Are all functions mmaped in? (map shared of course)

Where can I get further info?

Thanks in advance.
From: lkawecki@novell.com (Lewis Kawecki)
Newsgroups: comp.unix.questions
Subject: Re: net.views - novell/usl deal - REPOST
Date: 21 Jan 93 22:34:57 GMT
Organization: Novell Inc., San Jose, Califonia

In article <1993Jan21.152812.20521@utoday.com> wagner@utoday.com (Mitch Wagner) writes:
>            Does the imminent acquisition of USL by 
>            Novell mean the end of Unix as an open
>            operating system?
>
>
>We're asking this question to collect opinions for the "net.views" column in
>OPEN SYSTEMS TODAY. Please E-mail your responses to wagner@utoday.com.
> 
>By responding to that address, you'll be granting permission to OST to publish
>your response.
> 
>In order to use your response, we'd like to know who you are. Please tell us
>our real, full name, your job title, your employer, and location---or,
>alternately, if you're a student, your class standing (freshman, sophomore,
>junior, senior, grad, etc.), college and university, and its location. Please
>also include a telephone number where you can be reached during daytime hours
>in North America.
> 
>Please limit responses to about two full screens (24x80) of text, not including
>headers and other administrivia.
> 
>Responses to net.views will be posted to this space in about two weeks
>(FYI, for those interested - A previous net.views question on DEC and
>Alpha went out about a week ago, and I'll be posting responses there
>as soon as they slow down coming in.)
>
>Thanks for participating, and we look forward to hearing from you!
> 
>                         -- mitch w.
>--
>Mitch Wagner, senior editor, Open Systems Today
>2353 Massachusetts Ave. Suite 47, Cambridge, MA 02140
>wagner@utoday.com  (617)547-8485  CIS:70212,51  GEnie:MITCHWAGNER  
>For subscription information, please call 516/562-5882
>
>
>
Hi all,
	I couldn't help but reply to this one.  My Reply: I don't think so!!!
Novell has never been a company that took over other businesses to change them.
Novell buys companys to incorporate their knowledge into their own products.


<<------------------------------------------------------------------------->>
<< In real life:     Lewis R. Kawecki      |  OS/2 2.0 is not just another >>
<< Internet Address: lkawecki@novell.com   |  program...                   >>
<< Work Phone:       (408) 473-8941        |  It is a way of life!!        >>
<<------------------------------------------------------------------------->>
<< My comments and statement do not reflect those of anyone except myself  >>
<<------------------------------------------------------------------------->>
From: harley@engrhub.ucsb.edu (Harley Hahn,,,HAHN,personal)
Newsgroups: comp.unix.questions
Subject: Re: So what _is_ so good about vi?
Date: 22 Jan 93 03:51:50 GMT

In article <ln_smr.727524292@pki-nbg.philips.de> ln_smr@pki-nbg.philips.de writes:
>radinsky@spot.Colorado.EDU (Wayne Radinsky) writes:
>>PS Anyone know why "s" is used as an equivalent for "c "?
>s = substitute character (same as cl (change letter))
>S = substitute line (same as cc (change line)).

True, but we can be a little more precise.
"s" is not really a substitute for "c".

Like some other vi commands, "c" is followed by a cursor
move command.  It indicates that you want to substitute an
arbitrary number of characters for the data that is between
the current position and wherever the cursor move oepration
would move the cursor.

For example:

cw      --> substitute characters to the next 'end of word'
c)      --> substitute characters to the next 'end of sentence'
c}      --> substitute characters to the next 'end of paragraph'

Of course, you can use more complex cursor move commands:

c4w     --> substitute characters to the fourth next 'end of word'

(Notice the beauty of vi, all the cursor movement commands
that you memorize are used in so many ways.)

The "s" command, on the other hand does not take a following
cursor movement command.  By definition, "s" replaces only
a single character.  

Now, the convention is that for commands that can be followed by
a cursor movement command (such as "c", "d", "y"),
a double-letter command acts on the entire current line.

Thus, "cc" changes the entire current line.
"dd" deletes the entire current line.
"yy" yanks the entire current line to the unnamed buffer.

Commands that cannot be followed by a cursor movement command,
such as "s", do not have double-letter cousins.
Thus, there is no "ss" command.

(This only makes sense because commands like "s" go into
input mode immediately and the second "s" would be taken
as input.)

Finally, each of these commands has a capitalized counterpart:
"C", "D", "Y" and "S".

The convention is that this counterpart performs the same operation
on all or part of the current line, WHICHEVER WOULD BE
THE MOST USEFUL.

Thus, "C" and "D" act from the cursor position
to the end of the current line.

"Y" and "S" act on the entire current line, regardless of
the cursor position.

Thus, "S" is the same as "cc".

----------

See why vi is so wonderful:  It all makes sense :-)

The rules, as you can see, are complex and most people
don't bother to learn them. But as you practice,
your mind will learn the rules without you
ever consciously knowing what they are.
(Sort of like life...)

Thus, after awhile, you will find youself zipping along
using rules you don't really need to understand.

|-------------------------------------------|
| vi is difficult to learn but easy to use. |
|-------------------------------------------|

-- Harley Hahn

Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: replacement for vi
Originator: tchrist@pixel.convex.com
Date: Fri, 22 Jan 1993 17:06:21 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 ejh@khonshu.colorado.edu (Edward J. Hartnett):

[Saccharine emacs rhapsodizing deleted]

:	And before I get any flames from vi users, all I can say is,
:if you haven't used GNU emacs for at least a week, and given it a fair
:chance, then don't even bother replying. I've met very few people
:who've used both and stuck with vi.

Ah, the naivete of youth.

I know many folks who've used GNU emacs and gone back to vi.  These are
world-class programmers who have legitimate reasons for their choices.  
Be not so quick to discredit your betters.

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


lint(1) is the compiler's only means of dampening the programmer's ego.
Newsgroups: comp.unix.questions
From: jhgreen@cs.sandia.gov (Jethro H. Greene)
Subject: Re: uuencode - HELP!
Organization: Sandia National Laboratories, Albuquerque, NM
Date: Fri, 15 Jan 93 18:16:05 GMT

In article <C0vsKB.8LM@hkuxb.hku.hk> h9116771@hkux12.hku.hk (Chan Chung) writes:
>
>Hi,
>	I have some questions about uuencode to ask.
>	When I type "uuencode <filename>"
>	It displays "begin 620 <filename>"
>	I wait for some times, it has not response. Then I type ps, I find that the process uuencode is in its idle state. Why does this happen? What is the solution.
>
Type:

   uuencode name_that_you_want_it_uudecoded_to filename

'uuencode filename' waits for you to type.

This is all in the man pages.

-- 
Jethro H. Greene
Massively Parallel Computing Research Laboratory,
Sandia National Laboratories, Albuquerque, New Mexico

Xref: sparky comp.unix.questions:15784 comp.unix.shell:5441 news.answers:5352
From: erikh@and.nl (Erik Hamoen)
Newsgroups: comp.unix.questions
Subject: binary editor
Date: 27 Jan 93 08:15:05 GMT
Organization: AND Software BV Rotterdam

I am looking for a binary editor with extensive statistic facilities.
The editor would be able to read and change bytes in a binary file
and it would be possible to get answers to questions such as: what 
is the distribution of frequence in bytes on the positions n to m
(value 0 a times, value 1 b times, ..., value 255 k times).

Does anyone know of an editor which is available via anonymous ftp
or even better: available under standard unix?
Newsgroups: comp.unix.questions
From: comptec90017@camins.camosun.bc.ca
Subject: $i variable in scripts.
Organization: Camosun College
Date: Fri, 22 Jan 1993 22:41:59 GMT

I am modifying a Bourne Shell script file and I have found a variable that I
am unsure of.  It is the $i variable.  It is inside a function.  I am assuming 
that it is the variable which contains the function's parameter list.  Is this
an errant assumption?  I cannot find any other reference to it in any manual or
book that I have (including system manuals).  If it matters, I am doing this
on an RS6000 running AIX V3.2 (against my will I might add).
		Thanks for any help,
			Mark Clarkson
		Comptec90017@camins.camosun.bc.ca
From: aclark@netcom.com (Al Clark)
Newsgroups: comp.unix.questions
Subject: Re: How to add a list of numbers?
Date: 25 Jan 93 17:15:27 GMT
Organization: Self

In article <1993Jan24.120619.5072@mark-one.inet-uk.co.uk> mark@mark-one.inet-uk.co.uk (Mark Powell) writes:
>What is the best (least CPU time) to addup a list of ASCII numbers?
>eg you've just used cut to extract a list of file sizes from a ls -l
>listing and now want to add all the numbers together. Is there some
>utility that will do this?
>All I can see is to write a for loop to add each number in turn to a
>total, using expr.
>Thanks in advance.
>
>-- 
>Mark Powell
         I don't know if it's the most efficient, but it's efficient
	 enough for me.
	 N=5
	 M=15
	 SUM=`echo "$M + $N" | bc`

	 You can do any of the bc operations, include base and scale
	 operations.  Eg, hex arithmetic.
	 SUM=`echo "ibase=16; obase=16; $M + $N" | bc`
	 see bc(1) 

	 Note:  the bc supplied with many systems is a pre-processor for
	 'dc'.  You can get the Gnu bc which is more efficient.

-- 
Al - aclark@netcom.com - My opinions are my own.
Newsgroups: comp.unix.questions
From: jdb@surf.cis.ufl.edu (John Brothers)
Subject: brain search
Organization: CIS
Date: Thu, 21 Jan 93 23:24:15 GMT

I've been desiging a 'remote signalling' system, for unix (of course).
Essentially, a user would be able to send signals to processes on remote
machines, using a small daemon on each machine.  I've added some features,
like associating processes with names, so you don't need to know the 
pid, and "passwords" associated with the processes, so a group of people
would have signal access to the process, instead of just the owner.  
The system has been designed to be simple and portable, and currently
interacts between suns, hps and ultrix decs, with sgi (hopefully) not
far behind.  It uses sunrpc, and will shortly use des encryption, to be
as secure as possible.

So why am I telling you about this?  Well, my prof thinks that I could
submit something like this to usenix, but we want to make sure that there
aren't any current, well-used utilities that do the same thing.  

If there are, I probably need to find a new thesis topic.  :)

Thanks for your time.

Newsgroups: comp.unix.questions
From: an6096@anon.penet.fi
Subject: UNIX remote file access.
Organization: Anonymous contact service
X-Anonymously-To: comp.unix.questions
Date: Mon, 25 Jan 1993 18:01:14 GMT

I am new to UNIX, but an old VMS user.

In VMS there is a way to set you default directory to a remote machine.  So I
could look at files I have in a directory on another machine.  Or if the
protection will allow me I can look at the files in someone else's directory on
another machine.

Is there something similar in UNIX?  I am lead to believe is since when you
finger someone in UNIX you get the default directory information with
everything else.

I have looked in the online help with no success.  Any help would be
appreciated.  Thanks.
-------------------------------------------------------------------------
To find out more about the anon service, send mail to help@anon.penet.fi.
Due to the double-blind system, any replies to this message will be anonymized,
and an anonymous id will be allocated automatically. You have been warned.
Newsgroups: comp.unix.questions
From: jdell@nefertiti.mit.edu (John Ellithorpe)
Subject: Re: Automatic ftp session
Organization: Massachusetts Institute of Technology
Date: Thu, 21 Jan 1993 16:57:30 GMT

On 21 Jan 93 12:24:37 GMT, jbowyer@cis.vutbr.cs (Bowyer Jeff) said:

> I imagine the capability exists; therefore . . .

> Would someone please send me a sample shell program that ftp's to a
> site and returns a directory listing or gets a file . . . without user
> intervention.

> Thanks for your assistance.

How about this one.

#!/bin/csh -f
ftp prep.ai.mit.edu <<EOD
anonymous
jdell@maggie.mit.edu
cd /pub/gnu
ls
quit
EOD

And just run the script and pipe the output to some file.

John

--

===============================================================================
John Ellithorpe                           | Internet: jdell@maggie.mit.edu
Dept. of Physics, Rm 26-349               | Phone   : (617) 253-3074  Office
Massachusetts Institute of Technology     |           (617) 253-3072  Lab
Cambridge, MA  02139                      |           (617) 236-4910  Home
===============================================================================
Newsgroups: comp.unix.questions
From: saunders@luther.che.wisc.edu (Brian E. Saunders)
Subject: Re: Spell checker from inside vi
Organization: University of Wisconsin - Madison
Date: 26 Jan 93 17:01:05 CST

In article <C1HD54.Iv@news.udel.edu> william@bach.udel.edu (Wild William) writes:
>Is there a simple way to do spell checking on the current file from
>inside vi?
>
>i tried {!}spell but strange codes show up and it doesn't show any
>alternatives etc.

I can pipe the lines through spell by going to the command line and typing
"1,$!spell", but unfortunately the output replaces all of your lines!  Does
anybody know how to redirect the output to the bottom of the file you are
currently working on?  This should be easy, but I don't know how to do it.
-- 

Brian E. Saunders			saunders@luther.che.wisc.edu
Newsgroups: comp.unix.questions