HDTenEightyP/NetNews huggingface dataset:
From: hankins@cs.swarthmore.edu (Luke Hankins)
Newsgroups: comp.unix.questions
Subject: 7-bit transfer from unix -> PC?
Date: 22 Jan 93 22:11:16 GMT
Organization: Swarthmore College


	For some dumb reason the dialin I'm using requires a 7-bit
connection, but file transfers such as xmodem or Kermit don't work.  Is
there something else I can use?

		-luke
-- 
______________________________________________________________________________
Luke Hankins hankins@cs.swarthmore.edu |"Le coeur a ses raisons que la raison
for(MyAge=0;!Dead;EnjoyLife);          |   ne connait point" -Blaise Pascal
While not (EndOfLife) do Havefun(me);  |"...stay sane inside insanity..." -RHPS
Newsgroups: comp.unix.questions
From: shamel@mais.hydro.qc.ca (Stephane Hamel)
Subject: Re: How to add version id into a program?
Organization: Hydro-Quebec (DSB)
Date: Mon, 25 Jan 1993 18:42:36 GMT

ren@math.ohio-state.edu (Liming Ren) writes:

>I don't know what we need to do in C source code to have 
>version (unix command) to report version id.

>I checked  man version: It says 

>The version command looks for the ASCII string of characters
>following the string "@(#)RELEASE ". The string could be any
>sequence of printable characters terminated by a NEWLINE  or
>NULL.   Thus  if  you  put  this string into your files, the
>version command can be used to display the version  of  your

> 
>I put  lines such as

>/*@(#)RELEASE 1.0*/  or

>#define version_id "@(#)RELEASE 1.0"

>in my source program. Version does not work with this.

>Please help!
>Many thanks!

Usually, that kind of identification can be put in a C program using
something like:

#ifndef lint
static char *Id = "@(#)RELEASE 1.0";
#endif

Many revision control programs (like SCCS(1)) can automatically keep
track of versions and keep an appropriate id string in your source program.
The string must end up in the compiled program, thus only #define'ing it
will not help. Depending on wich Unix you are, the command to show an
ID string will be: ident(1) or version(1).

Hope this helped!
--
 Stephane Hamel (SHamel@Mais.Hydro.Qc.Ca) | AutoControl Inc.
 Senior Programmer-Analyst                | Montreal, Quebec, Canada
Newsgroups: comp.unix.questions
From: dnh@mfltd.co.uk (Des Herriott)
Subject: Re: History in ksh?
Organization: Micro Focus Ltd., Newbury, UK
Date: Fri, 22 Jan 1993 12:08:23 GMT


In article <1993Jan21.141915.3359@candle.uucp>, root@candle.uucp (Bruce Momjian) writes:
> 
> Add this to your .kshrc file:
> 	set -o emacs
> 	alias __A=^P
> 	alias __B=^N
> 	alias __C=^F
> 	alias __D=^B

Nah, use 'set -o vi' !
                 --

Sorry, couldn't resist :-)
-- 
Des Herriott,           /     "...and I hate, and I hate, and I hate,
Micro Focus, Newbury.  /             elevator music..."
+44 (0635) 565354     /
dnh@mfltd.co.uk      /                   -- Tori Amos, Little Earthquakes.
Newsgroups: comp.unix.questions
From: jhgreen@cs.sandia.gov (Jethro H. Greene)
Subject: ASCII numbers
Originator: jhgreen@cs.sandia.gov
Organization: Sandia National Laboratories, Albuquerque, NM
Date: Sat, 16 Jan 93 00:57:25 GMT

Given the ASCII number in bin., hex., or dec., how would I display the
corresponding character?  Also, is there any problem with displaying the
null character using this method?

Thanks.

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

Newsgroups: comp.unix.questions
From: holger@is.morgan.com (Holger Veith)
Subject: UNIX/ASCII report writer?
Organization: Morgan Stanley - IS
Date: Fri, 22 Jan 1993 19:09:47 GMT

Hi,

is there a report writer which is simpler to use than tbl or tex
and allows column formatting, grouping, total&subtotal calculations on breaks,
grouping of column headers, page numbering, reprint headings on nextpage,
footnotes, left/right/center formatting ...

ex.
            MAJOR HEADER
            ------------
            HeadA  HeadB
            -----  -----
             10.2  1.000
             11.3  2.000


I would like this to run off ascii files, but I realize that most applications
are database report writers.  Any help would be appreciated.

Holger.


Xref: sparky comp.unix.questions:15910 comp.unix.admin:7229
Newsgroups: comp.unix.questions,comp.unix.admin
Subject: Question on setting up a printer!!
From: sl0k3@io.ee.usu.edu (Saturn)
Date: 24 Jan 93 20:44:32 MDT
Distribution: world
Organization: Utah State University

Hi,
	I have setup HP laserjet IIIp on a Silicon
Graphics workstation.  It has been set up as geeneric
postscript printer.  The model it uses, gpsinterface, 
says that it is an interface for System 5, for printing
postscript and regular text files.  It also say it uses
a filter called lptops for comverting non-postscript to 
postscript.  This is all fine because I am able to print
both postscript and text files using the "lp" command.

	However, I have set up lpr to satisfy my network 
printing needs.  In this case I am only able to print
only postscript files.  When I send text files, I get an
error on the printer and if Flushes.   Is there something
I am missing.  A copy of my printcap entry follows
#####################################
lp|laserjet|HP Laserjet IIIp:\
        :lp=/dev/laserjet:\
        :sd=/usr/spool/lpd/laserjet:\
        :mc#0:\
        :sf:\
        :sh:\
        :lf=/usr/spool/lpd/laserjet/laserjet-log:\
        :pl#66:pw#89:

######################

Can anybody help. 

Please reply by email.  Thanks in advance


*Sudhakaran Ram*

Newsgroups: comp.unix.questions
From: channui@ranma.austin.ibm.com (Christopher Chan-Nui)
Subject: Re: How does one change part of a file name in a shell script?
Date: Fri, 22 Jan 93 02:24:41 GMT
Organization: IBM T. J. Watson Research
X-Newsreader: TIN [version 1.1 PL8]

Juha Laiho (jlaiho@ichaos.nullnet.fi) wrote:
: In article <RICHARD.93Jan14082457@ajax.stanford.edu> richard@ajax.stanford.edu (Richard Schiek) writes:
: >So is there any way to take a file name in a shell script, chop off
: >it's suffix and add a new one?
: >
: Try the 'basename' command. I think it's what you're looking for.

: f.ex:
: basename foo.bar .bar		produces
: foo

Or if you have a shell that supports it (csh, tcsh, and my favorite zsh) you
could use Environment Variable Modifiers.  For example:

#!/bin/zsh
NAME=$1:r
tex ${NAME}.tex
dvips ${NAME}.dvi
lpr ${NAME}.ps
rm ${NAME}.ps

You'd probably want to do some error checking or something though (so it
doesn't continue when tex fails with millions of errors. :)

Hope this helps.

---
Christopher Chan-Nui    | The higher the "higher-ups" are who've come to see   
channui@austin.ibm.com  | your demo, the lower your chances are of giving a    
#include <disclaimer.h> | successful one.                                      
Newsgroups: comp.unix.questions
From: zheng@cs.sunysb.edu (Xiaohong Zheng)
Subject: Re: Soft link
Organization: State University of New York, Stony Brook
Date: Thu, 28 Jan 1993 04:52:39 GMT

In article <1k43bfINNctj@msuinfo.cl.msu.edu> friedenb@pine.egr.msu.edu (Gedaliah Friedenberg) writes:
>
>I have a program which requires me to make a 
>soft link of ~/.plan to /tmp/.plan
>
>I have looked in manuals, but with no success.
>I know about hard links (ln -s), but I have
>never heard of soft links until this program.
>
>If someone could let me know how to do this,
>I would greatly appreciate it.
>
>Gedaliah Friedenberg
>-=-Department of Mechanical Engineering
>-=-Department of Metallurgy, Mechanics and Materials Science
>-=-Michigan State University
>
>
>

   I guess you mean symbolic link, which is special directory entry
that points to another file or directory. Just do the following

       ln -s ~/.plan /tmp/.plan

If you remove ~/.plan, /tmp/.plan will point to something that does exist.
                   


Newsgroups: comp.unix.questions
From: lnosek@ux4.cso.uiuc.edu (Luke Nosek)
Subject: Re: Need to login many times, but type passwd once.
Organization: University of Illinois at Urbana
Date: Thu, 21 Jan 1993 04:21:41 GMT

lnosek@uiuc.edu (Luke Nosek) writes:

>	I'm in a situation where I'd like to login to several (10+)
>machines that I have accounts on, execute a command, and logout.

>	If I were to do this the easiest way, it would be rshing
>to these machines, and executing the command. But to have rsh work
>I need to have a working .rhosts file on all the machines. We're not
>allowed one because it would be to insecure a system.

>	So I'm stuck with at the very least typing in the passwd
>for EACH AND EVERY machine that I want to login to. I want to automate
>this process.

>	I know that I can simply redirect ( < ) a file to, for example
>the ftp program, such that it logs in and types the passwd for me, then
>gets the file I want for me, all by typing ftp -ni < file, where file
>contains the necessary commands for ftp.

>	When I tried this with rlogin, it does not accept the password
>from the redirected file. I know this is a security measure, but for
>my convienience, and for the success of my project, I need to  
>circumvent this.

	Thanks to everyone who mailed the answer - use a little program
called expect which allows you to develop scripts that can communicate
back and forth with shell commands.

ie:	rlogin, expect waits for the Password: prompt, then sends password.

							Luke Nosek
Newsgroups: comp.unix.questions
From: litt3509@mach1.wlu.ca (Carl Litt u)
Subject: How to use finger???
Organization: Wilfrid Laurier University
Date: Wed, 27 Jan 1993 20:15:47 GMT

Can anyone tell me what all the options of the finger command are??  I've
looked on our system for help, but there is none ('usage finger','man finger',
'localman finger').  Also, how do you set your plan?


Newsgroups: comp.unix.questions
From: chaplin@keinstr.uucp (Roger Chaplin)
Subject: Re: [Q] tar destination across multiple volumes
Organization: Keithley Instruments, Cleveland, Ohio
X-Newsreader: TIN [version 1.1 PL8]
Distribution: na
Date: Fri, 22 Jan 1993 13:26:09 GMT

Stephen Opal (sno@ais.org) wrote:
: I have heard that tar might be able to store its output across volumes.

: In my case I'm looking for a way to archive an entire partition to 
: a floppy device.  This floppy will obviously fill up long before the
: tar is done.  Is there a way to get tar to continue on the next installed
: floppy volume.  It seems there would be a bit of a problem with sync.

: Assistance would be appreciated.

I use `bar' which is like `tar' except that it handles multiple
volumes.

-- 
Roger Chaplin / chaplin@keinstr.uucp / CI$: 76307,3506
"For the lines are long and the fighting is strong and they're breakin'
down the distance between right and wrong."
                        - Bob Dylan, "Ring Them Bells"
Newsgroups: comp.unix.questions
From: monson@diablo.amd.com (Steve Monson)
Subject: Re: How to add a list of numbers?
Organization: Advanced Micro Devices, Inc., Austin, TX
Date: Tue, 26 Jan 1993 13:22:39 GMT

>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.

Well, using our ls -l, I get something like this:

-rwx------  1 monson       9320 Aug  7 08:36 timesheet
-rwx------  1 monson        349 Mar 24  1992 triplets
-rwx------  1 monson       1258 Dec 17  1991 ts
-rwx------  1 monson        473 Jun 17  1992 tu
-rwx------  2 monson        263 Sep 16  1991 unrot
-rwx------  1 monson         47 Apr  9  1991 unshar
-rwx------  1 monson        647 Jan 27  1992 uum
-rwx------  1 monson       1227 Oct  2 11:05 uumail
-rw-------  1 monson        530 Apr 10  1992 uumail.sh
-rwx------  1 monson       1006 Oct 30  1990 uumdecode
-rwx------  1 monson        344 May 23  1991 wordcards
-rwx------  1 monson       1045 Sep 23 12:21 xcursors

So I want to add up all the items in the 4th column. You can use "cut" to
get the column entries, but multiple delimiters have to be compacted. So, the
following command line runs ls, shrinks the white space to single blanks,
extracts the 4th column, and changes all the blanks to "+" signs, and
feeds the expression into bc, which prints the answer:

echo `ls -l | sed 's/  */ /g' | cut -d\  -f4` | sed 's/ /+/g' | bc

I suppose you could also use expr, but then you have to insert spaces
around the plus signs, and make it all a single expression as arguments
on the expr command line:

expr `echo \`ls -l | sed 's/  */ /g' | cut -d\  -f4\` | sed 's/ / + /g'`

but that starts to get messy, with the nested `` strings. Still, it avoids
loops. Now, as to whether it's the "fastest," I have no idea. It does do a
bunch of forks etc. to crank everything up. I suppose perl would be better;
it often is.

Steve
-- monson@diablo.amd.com -- (512) 462-4013
 __     | signature designed by | If God were a liberal, we'd have the
(_      | (and ripped off from) | Ten Suggestions.
__)teve | Stephen Wayne Miller  |         James P. Hogan, _The Entoverse_
From: ln_smr@pki-nbg.philips.de (Stephen Riehm)
Newsgroups: comp.unix.questions
Subject: Re: Spell checker from inside vi
Date: 28 Jan 93 08:18:42 GMT
Reply-To: ln_smr@pki-nbg.philips.de

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.

if you have the chance, get a copy of ispell (interactive spell). It
actually has the courtesy to prompt you with suggested corrections
etc, as opposed to spell's habit of simply dumping a list of wrong
words on your doorstep.

If you have ispell, you can then create the following mapping:
	map _S :w!^V^M:!ispell %^V^M:e!^VM^VM
(The two ^V^M's at the end are intentional, I don't know why, but
just having one doesn't work for me)

If you still insist on using spell, try the following mapping:
	map _S :w!^V^M:!spell % > _sp^V^M:e! _sp^V^M^V^M
This will put the badly spelt words into a file called _sp, and
automatically start editing it. You can then swap between the original
file and the list by using ^^ (ctrl-shift-6) or :e#.

in both cases I have _S as the spell check macro name, you can of
course call it whatever you like :-)

best of luck!

--------------------------------------------------------------------
Stephen Riehm		   Configuration Management	      _-_|\ 
ln_smr@pki-nbg.philips.de  Philips Kommunikations Industrie  /     \
Work: +49 911 526 2975	   Nu"rnberg, Germany		     \_.-.!/
Fax:  +49 911 526 3678	   "I was there, now I am here!"          v 
"My company speaks another language, I CAN'T speak on its behalf"
PS: You may think I am joking, I can't speak the language that well so
		PLEASE DON'T REPLY IN GERMAN!
			 - thanks -
Newsgroups: comp.unix.questions
From: woods@robohack.UUCP (Greg A. Woods)
Subject: Re: So what _is_ so good about vi?
Organization: Elegant Communications Inc.
Summary: absolutely nothing!  :-)
Date: Sun, 24 Jan 93 23:08:02 GMT

In article <hellmann.727326418@pecan.cs.scarolina.edu> hellmann@cs.scarolina.edu (Doug Hellmann) writes:
> One reason I suspect vi is so popular is that very few of the editing commands
> require special control characters.  In fact, the only vi command I can think
> of (off the top of my head) which uses a control character is the ^L command
> to redraw the screen.  How often do you use that?  The other one you might
> consider a control sequence is the Escape key.  Most keyboards have one of
> those though.  And if you don't, then it is configureable.

Actually, there are quite a few control characters used in vi.  One
more of the top of my head is '^V' for quoted insert of control
characters.

BTW, the ESC key is only used when a true meta key is lacking on your
terminal (or when your connection to the host strips the 8th bit.!).
Have a read of the introductory documents of GNU-emacs for more good
words on what makes a decent terminal.

That's one of the reasons I like emacs-like editors and hate vi.  If
you forget you're not in one of the "type some text" modes, vi can do
some wonderful things to your text as you type what you think are only
a few new words!  Only time emacs goes wonky in the same way is when
my control or meta keys stick, and with real emacs you've got a very
long recursive undo to get yourself trouble.

> The reason this feature is so important is that vi can be used with most types
> of terminals without major reconfiguring of the keyboard.  I like to use it 
> because I can use it with my modem without worrying about activating any of 
> the local commands.

I've never had to re-configure my keyboard to use emacs....  Mind you
the AT&T 5620-DMD's I use most often have '^_' mapped to '^/' and '^^'
mapped to '^.', but that's AT&T for you....  In any case, it's a
matter of reconfiguring my fingers in those cases.

> It is also good for touch typists, because your hands don't leave the center
> of the keyboard (except to hit Escape).  I can type between 30 and 40 words
> per minute (which is not so great, but most programmers I know do some sort of
> advanced hunting and pecking).  Using vi to do my editing allows me to do
> things more rapidly than many of the other people I work or go to school with.

Again, this is why I like emacs....

> I also get the impression, though I haven't checked it out myself, that vi
> uses less memory than emacs.  I don't know about any of the other editors.  Of
> course, in today's age of cheap memory, this isn't such a big concern.  But it
> seems to me if it is smaller, it is probably more efficient.

This is true of some editors, but most smaller emacs clones are also
smaller than vi (eg. 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
From: ttsai@crhc.uiuc.edu (Timothy Tsai)
Newsgroups: comp.unix.questions
Subject: How to recognize a csh var as a number?
Date: 21 Jan 1993 15:17:23 -0600
Organization: Center for Reliable and High-Performance Computing, University of Illinois at Urbana-Champaign
NNTP-Posting-Host: haydn.crhc.uiuc.edu

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?

Please email me any help.  Thanks.
-- 
Timothy Tsai              Celtics Rule!!!
ttsai@uiuc.edu            Let's go Mets!!!
Newsgroups: comp.unix.questions
From: krisk@ux1.cso.uiuc.edu (Kris Klindworth)
Subject: Re: Automatic ftp session
Organization: University of Illinois at Urbana
Date: Thu, 21 Jan 1993 18:32:48 GMT

jbowyer@cis.vutbr.cs (Bowyer Jeff) writes:

>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.

This is a variation on a script which we use fairly regularly
for down loading files to a pc. In our case this script is
run as an lpr filter and an old pc is serving as a print server.
The conversion to a general utility is left to the reader
as an exercise ;-).


#! /usr/bin/sh
machine="ux1.cso.uiuc.edu"
user="anonymous"
passwd="test"
command="dir"
timeout=5  # used with ping

# check to make sure that the pc is running NCSA telnet
#    (Commented out because of possible incompatibilities with local ping)
#/usr/etc/ping $machine $timeout
#if [ $? != 0 ]
#then
#	echo "$0: $machine is not avaible to handle your job" 2>&1;
#	echo "$0: cancelling job" 2>&1;
#	exit 1 ;
#fi

/usr/ucb/ftp -n <<EOT
open $machine
user $user $passwd
$command
quit
EOT

#------------------------------------------------------------------------------
# Kris Klindworth                    Internet: krisk@ux1.cso.uiuc.edu
# Database Programmer                Phone   : (217)244-7120
# Illinois State Water Survey        US Mail : 2204 Griffith Dr
#                                             Champaign, IL 61820
From: dik@cwi.nl (Dik T. Winter)
Newsgroups: comp.unix.questions
Subject: Re: History in ksh?
Date: 22 Jan 93 22:16:38 GMT
Organization: CWI, Amsterdam

In article <C19Coy.DKs@encore.com> tma@encore.com (Thanh Ma) writes:
 > dnh@mfltd.co.uk (Des Herriott) writes:
 > >In article <1993Jan21.141915.3359@candle.uucp>, root@candle.uucp (Bruce Momjian) writes:
 > >> 	set -o emacs
 > >Nah, use 'set -o vi' !
 > or set in .profile
 > VISUAL=vi
 > export VISUAL
 > 
Well, I have FCEDIT set to /usr/ucb/vi, but at the same time 'set -o emacs'.
You might call me schizophrenic.
-- 
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland
home: bovenover 215, 1025 jn  amsterdam, nederland; e-mail: dik@cwi.nl
Newsgroups: comp.unix.questions
From: dejesus@pluto.nwc.navy.mil (Francisco X DeJesus)
Subject: Re: replacement for vi
Organization: Science Applications International Corp.
Date: Wed, 27 Jan 1993 00:38:15 GMT

In article <1993Jan22.233256.19125@ringer.cs.utsa.edu> pnarsipu@ringer.cs.utsa.edu (Praasad Y. Narsipur) writes:
>In article <EJH.93Jan18200012@khonshu.colorado.edu> ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
[...]
>>	Try GNU emacs. It's great, and with a little help you can set
>>it up to emulate the keystrokes of your favorite editor. Why should
[...]
>>	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.

I've used both, and I'll stick to using both. Which one I use depends
on what system I'm on and what type of editing I wish to do...

>Hey don't be so nasty about Unix and in particular vi editor.
>If u`r so much against vi why don't you write an editor that
>works like DOS editor. I agree that vi takes lot of time to get used to
>but when you are fast vi can useful and fantastic.

As it has been pointed out before, the best thing about "vi" is that
it's available on just about every Unix system. If you want to install
"emacs" (or any other editor), chances are you will have to edit a few
Makefiles to get it to build and work properly. It's good to know at
least enough "vi" to be able to configure a replacement for it...
-- 
      Francisco X DeJesus  ----- S A I C -----  dejesus@chinalake.navy.mil
 ------------------------------------------------------------------------------
  * disclaimer: Opinions expressed here are mine. Typos and errors are yours *
 "Duck Season!" "Rabbit Season!" "...rabbit season." "It's Duck Season! SHOOT!"
From: brian@icsbelf.co.uk (Brian Morrow)
Newsgroups: comp.unix.questions
Subject: AV-SYNC BBS
Date: 28 Jan 93 09:42:52 GMT
Organization: ICS Computing Group Ltd, Belfast
X-Newsreader: TIN [version 1.1 PL8]

I',m trying to get the phone number of the AV-SYNC BBS in Atlanta, Georgia;
it's presided over by someone called Bill Tullis. I am lead to understand
that they hold source code for a public domain COBOL compiler COBOL650.
Xref: sparky comp.unix.questions:15797 comp.unix.shell:5450 news.answers:5368
From: ateh@solomon.technet.sg (SlEepInG..Zzz..ATEH)
Subject: How do I check a name?
X-Newsreader: TIN [version 1.1 PL8]
Date: Fri, 22 Jan 1993 12:50:38 GMT

Hello ,

I have a question concerning emailing.

Say I have a friend studying in cornell University and I would like to email him, so how do I actually figure out his email address?
Cornell University's nde address is helios.tn.cornell.edu

Is there actually a way to do a finger or who to tell if he/she is there?
Thanks in advance.

Andrew
Newsgroups: comp.unix.questions