HDTenEightyP/NetNews huggingface dataset:
From: janw@fwi.uva.nl (Jan Wortelboer)
Subject: Re: Question on sed
Organization: FWI, University of Amsterdam
Date: Tue, 26 Jan 1993 10:50:05 GMT

rs@cmie.ernet.in (Rajappa Iyer) writes:

>halverso@staff.tc.umn.edu (Chris Halverson) writes:

>>In <1993Jan24.102643.63110@cc.usu.edu> sl0k3@pluto.ee.usu.edu (Saturn) writes:
>>>Hi,
>>>	My appologies if this is a FAQ.  
>>>How does one apply some editing commands to
>>>a file using sed without having to redirect
>>>output to another file.  I want the changes to 
>>>appear on the same file.

>>Use Perl instead. It can does all of the sed commands and will write
>>back to the file.

>Or try something like this:

>sed <sed commands> file > /tmp/$$ && mv /tmp/$$ file

The answer is more simple if you simple want to edit a file use ed
sed is only the stream version of ed

e.g.

ed file <<!
/search/s/aap/mies/
w
q
!


Jan.
-- 
Jan Wortelboer,  University of Amsterdam
                 Computer Science Department  Email: janw@fwi.uva.nl
Unix             Kruislaan 403 Kamer F003     Phone: +31 20 525 7501
systems manager  1098 SJ AMSTERDAM            Fax  : +31 20 525 7490
Newsgroups: comp.unix.questions
From: KZUPAN@LSTC2VM.stortek.com
Subject: Printing the .ps file
Organization: StorageTek SW Engineering
Date: Sun, 24 Jan 1993 17:45:37 GMT

Hi
  I just have a quick question. Is there an easy way to print a .ps
file in    MS-Dos?  I need to print out some manuals I got off the
usenet and they arein .ps format, unfortunately I don't have the tools
to do this.
 
 
                                          Suggestions please!!!
                                          Kevin Zupan
                                          Email:kzupan@lstc2vm.stortek.com
Newsgroups: comp.unix.questions
From: dnh@mfltd.co.uk (Des Herriott)
Subject: Re: How to recognize a csh var as a number?
Organization: Micro Focus Ltd., Newbury, UK
Date: Wed, 27 Jan 1993 11:12:24 GMT


In article <1993Jan26.231002.165645@dstos3.dsto.gov.au>, sct@tumtum (Shaun Troedson) writes:
> Timothy Tsai (ttsai@crhc.uiuc.edu) wrote:
> : 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?
> 
> I think this works but its a mess:
> 
> echo @ var = $var | csh -t >& /dev/null
> 
> The status variable will now contain 1 if 'var' is alpha, 0 if it is num.
> There's probably a less round-about way.

Well, at the risk of starting a flame war, yes, there is: use a Bourne-derived
shell.  csh really is not suitable for shell programming, and only just about
cuts it as a command-line interpreter.

The above problem is simple if you use sh or (and undoubtedly bash too, though 
I haven't used it):

case $variable in
   [0-9][0-9]*)
      # it's a number
      break;;
   *) 
      # it's not a number
esac

See?  No need to fork a new shell, no need to do any output redirection.  It's
all done by one process.  I can't offhand think of a way of doing that in csh
(and I used csh for 3 years before I saw the light :-)

Des.

-- 
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: william@bach.udel.edu (Wild William)
Subject: Spell checker from inside vi
Organization: University of Delaware
Date: Tue, 26 Jan 1993 21:31:51 GMT

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.

Bill

-- 
         
William York
william@chopin.udel.edu
(302) 453 8147
From: ejohnson@void.ncsa.uiuc.edu (Eric E. Johnson)
Newsgroups: comp.unix.questions
Subject: Re: Sockets: How do I detect when it has unexpectedly closed
Date: 21 Jan 93 18:08:36 GMT
Organization: University of Illinois at Urbana

ejohnson@void.ncsa.uiuc.edu (Eric E. Johnson) writes:

>Well, I've tried using the signal function to catch SIGPIPE, but my
>sockets aren't even generating SIGPIPES when I'm writing to them, and
>yet they're supposedly disconnected.

>Obvious possibilities include... is my signal function set up correctly?
>Yep, because it does respond to control-c's.  Is the signal currently
>masked out via sigmask?  No, I checked that.

>Anything else?

I decided to investigate the source code to netstat.  It seems that
netstat knows more about the state of my socket than I do.  I've got the
source code to netstat, unfortunately, it finds the state of my socket
by reading memory from the kernel.  If I do get find out how to properly
use the kvm_read command to find the netstat info, I'll post to the
group.

-- 
Eric E Johnson             | "The uncontested absurdities of today are the
ejohnson@a.cs.uiuc.edu     |  accepted slogans of tomorrow." - Ayn Rand
From: caedmon@cats.ucsc.edu (Jeff A Ishaq)
Newsgroups: comp.unix.questions
Subject: Simple C shell ? regarding switch
Date: 26 Jan 93 04:34:19 GMT
Organization: University of California, Santa Cruz
NNTP-Posting-Host: am.ucsc.edu


The only book I have on C shell programming has a cheesy example, so I
couldn't derive the correct format.  Can somebody tell me how I can
set up a simple switch statement?  Assume

echo "Type your choice (1-4 or Q to exit)"
set selection=$<

switch ($selection)
	1:
	   echo "You typed one!"
	   breaksw
	2:
	   echo "You didn't type 1, 3, 4, or q."
	   breaksw
	3:
	4:
	Q:
endsw

I assume the reason this doesn't work is I need to do something 'special'
to 1:  -- something like '1': ?  Ideas?

thanks,
-jq

	
	
-- 
,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,
,;';,   caedmon@ucscb.ucsc.edu               Jeff Ishaq          .,;';,
,;';,   I am a meatball:  Bite me.           Guitar withdrawal!  .,;';,
,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,.,;';,
From: rdorich@jade.tufts.edu (Rob)
Newsgroups: comp.unix.questions
Subject: ile (Input Line Editor)
Date: 25 Jan 93 21:54:09 GMT
Organization: Tufts University - Medford, MA

Ok, I know this is probably really easy and that I just can't
see the obvoius answer, but has anyone been able to compile
ile under Solaris-2.1?  It's giving me the hardest time. 

Any help will be appreciated, many thaks in advance,

Roberto Dorich
 
-- 
-------------------------------------------------------------------------------
Roberto Dorich		 |           /~~  \ /  ~~/~~ /~~/  /~~  /|  /    /~~
			 |    SKI   /--    X    /   /__/  /--  / |/ |   /--
Electrical Engineering	 |         /__    / \  /   /\    /__  /     |  /__
Xref: sparky comp.unix.questions:15939 comp.unix.shell:5496
From: aj651@cleveland.Freenet.Edu (Bob James)
Newsgroups: comp.unix.questions,comp.unix.shell
Subject: Re: Impractical question about variables
Date: 25 Jan 1993 23:48:54 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: aj651@cleveland.Freenet.Edu (Bob James)
NNTP-Posting-Host: slc4.ins.cwru.edu


In a previous article, jhgreen@cs.sandia.gov (Jethro H. Greene) says:

>
>With my understanding of the shell, I have come to the conclusion that this
>can not be done with in the boundaries of UNIX.  However, to be sure, I am
>asking the Net.
>
>What is involved in referencing a variable from another login?  For example,
>on terminal one, I type hello=world.  I run over to terminal two and want
>to know what $hello is.
>
>Is this possible?
>
>Thanks.
>
>-- 
also named pipes work eg echo $VARIABLE > $HOME/mypipe

-- 
It was the best of times, it was the worst of times. But there's never
enough time.                   Bob James (aj651@cleveland.Freenet.Edu)
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: How to add version id into a program?
Date: 25 Jan 1993 21:05:33 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
Distribution: world
NNTP-Posting-Host: telecaster.think.com

In article <1k10nvINNsnr@function.mps.ohio-state.edu> ren@math.ohio-state.edu (Liming Ren) writes:
>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.

You have to arrange for these to be incorporated into the *binary*, since
that's what "version" looks at.  Comments and preprocessor defines don't
get included in the generated code.  Try:

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

The #ifndef shuts up lint, which would otherwise complain about this unused
variable.  You could also avoid this by providing an option to your program
that makes it print its version, which would reference the variable.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: rouben@math9.math.umbc.edu (Rouben Rostamian)
Newsgroups: comp.unix.questions
Subject: Re: How to add a list of numbers?
Date: 24 Jan 1993 22:09:23 GMT
Organization: University of Maryland Baltimore Campus
NNTP-Posting-Host: math9.math.umbc.edu

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.

ls -l | awk '{sum += $4} END{print "total: " sum}'

$4 refers to the fourth column in the input stream.  Replace it with
any other column number as needed.

--
Rouben Rostamian
Newsgroups: comp.unix.questions
From: dfox@quack.sac.ca.us (David Fox)
Subject: Re: how do I extract rzsz9202.tar-z?
Summary: rename them first 
Keywords: tar zcat compress
Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'.
Distribution: na
Date: 26 Jan 1993 06:40:25 UTC

In article <1993Jan23.102802.13303@CSD-NewsHost.Stanford.EDU> schwim@Xenon.Stanford.EDU (Rosebud) writes:

>uncompress < rzsz9202.tar-z | tar xvf -
>
>Of course, it's probably simplest to download files from an archive
>that has capital letters.  The lower case z extension is supposed to
>be for pack not compress.

Actually, it's simplest to rename the file first to something reasonable like
rzsz9202.tar.Z, then use:

tar -xzvf rzsz9202.tar.Z

to extract it. -z, if your tar has it, means to handle compressed files.

>-= Larry Schwimmer (schwim@xenon.stanford.edu)


-- 
------------------------------------------------------------------------
in real life: david fox            email: dfox@quack.sac.ca.us
5479 Castle Manor Drive,                  
San Jose, CA 95129                 "Thanks for letting me change some
USA                                 magnetic patterns on your HD" -me
408-253-7992                        
"You've just won an absolutely FREE trip to the Isles of Langerhans" -me
------------------------------------------------------------------------
From: taft@gibbs.oit.unc.edu (Todd D. Taft)
Newsgroups: comp.unix.questions
Subject: Randomly selected .signature file in tcsh
Date: 26 Jan 93 05:10:56 GMT
Organization: University of North Carolina at Chapel Hill

Is there a way to write a simple script file in tcsh that will
randomly select a message to place in my .signature each time that I
invoke my mailer?  If possible, I would like something that allows me to
use a different set of .signatures for my newsreader, since there I would
want to include my bitnet and other addresses.  Pardon my ignorance, since
I'm very new to unix.

-- 
					--Todd D. Taft
					"I love mankind.  It's the people
					I can't stand." -- Charles Shultz
Newsgroups: comp.unix.questions,comp.unix.misc
From: a866700@hp9000.csc.cuhk.hk (Wong Siu To)
Subject: Information wanted: Talk
Organization: The Chinese University of Hong Kong
Date: Fri, 29 Jan 1993 02:56:13 GMT

Hi there,

I apologize if this's an FAQ.

I've installed talk/ntalk/ctalk on our HP 9000/720 running HP-UX 8.07.
I wonder if they're the same software.  

The compilation is completed but when I try to talk to someone on the
system, the program hangs with message "[Checking for invitation on
caller's machine]".  Some of the READMEs state that the ntalkd daemon
for remote user is needed.  I would like to know how to make it work and
where to get more information/document on this topic.

Any help will be much appreciated.

Thanks in advance.

Regards,

-- 
______________________________________________________________________
S.T. Wong             	            [] BITNET: A866700@CUCSC.BITNET      
Computer Services Centre            [] Internet: st-wong@cuhk.hk 
The Chinese University of Hong Kong [] Tel. No: (852) 609 8825      
Newsgroups: comp.unix.questions
From: jabutt@sacam.OREN.ORTN.EDU (Joe Butt)
Subject: Re: FTP ADRESSES
Organization: Oak Ridge National Laboratory
X-Newsreader: Tin 1.1 PL5
Date: Fri, 29 Jan 1993 04:19:26 GMT

lsa (lsa@lulea.trab.se) wrote:
: 
:  Hi there. I`m back with an other "question". I am trying to get in contact
: with FTP connected bases but i have seem to have lost my addressbook.
:  So i am now asking you kind persons who have got ANY FTP adress to
: type it in here.

ftp.uu.net


--JAB

|jabutt@sacam.oren.ortn.edu              
|Joe Butt @ Oak Ridge Educational Network
From: HAC041@DJUKFA11.BITNET (Konrad Hinsen)
Newsgroups: comp.unix.questions
Subject: How does biff work and why doesn't it?
Date: 25 Jan 93 16:31:19 GMT
Organization: Forschungszentrum Juelich

Currently I am investigating a strange problem on our Sun-3 running
Sub-OS 4.0.1: Many users have "biff y" in their .login script, but
it works reliably only for some, and sporadically for the others.
So I copied all startup files (.login and .cshrc) from one user who
has no problems to the home directory of someone who has, to make
sure the environment is exactly the same. Still the same problem.

Does anyone have any idea how this could happen? If not, could anyone
tell me where to find any information about how biff works at all? The
man page says nothing about that.

Konrad Hinsen (hac041@zam001.zam.kfa-juelich.de)
Newsgroups: comp.unix.questions
From: ehigh@news.weeg.uiowa.edu (Egyirba High)
Subject: Re: Using 'talk'
Organization: University of Iowa, Iowa City, IA, USA
Date: Sun, 24 Jan 1993 02:08:17 GMT

I;ve been using 'talk'to converse with a few friends.  But sometimes,
when I try to signal a couple of people I get "checking for invitation
on caller's machine."  That message just stays on the screen for the
longest time and I never get any connection.  Can anybody tell me why this
happens and what to do about it.  Thanks in advance.

Egyirba
 
-- 

******************************************************************************
ehigh                                  You never miss your water 'till your
High on life!                          well runs dry....  Give thankx.
Newsgroups: comp.unix.questions
From: tparker@music.scd.ucar.edu (Tom Parker)
Subject: Re: How do you print a character given its ASCII number?
Organization: Scientific Computing Divison/NCAR Boulder, CO
Date: Thu, 28 Jan 1993 18:37:52 GMT

In article <1993Jan15.034744.22237@cs.sandia.gov> jhgreen@cs.sandia.gov (Jethro H. Greene) writes:
>Given an ASCII number (dec, hex, or oct) how would I print that particular
>character?  Also are there any problems with the NULL char.?
>
>Thanks in advance.

What language are you writing in?  Fortran, C, shell, ... ?

-- Tom
--
+--------------------------------------------------------------------+
| Tom Parker             |  National Center for Atmospheric Research |
| tparker@ncar.ucar.edu  |  (303) 497-1227                           |
+--------------------------------------------------------------------+
From: 890758k@dragon.acadiau.ca (Wing Ho Kwan - Louie)
Newsgroups: comp.unix.questions
Subject: can unix rpc procedure accept more than one parameter
Summary: how many parameters can pass in unix rpc procedures
Keywords: a
Date: 24 Jan 93 17:40:03 GMT
Organization: Acadia University

Hi,
Another question in unix rpc

Do anyone knows how many parameters can pass to procedures.
Since I find that the rpcgen can only allows me to have one parameter
in each server procedure..... (is it quite limited ????!!!!)

If you have any suggestions , please let me knows
Thanks for advances......

Regards,
Louie Kwan

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*||||||||||||||  ASU Box 6696, Wolfville, N.S. Canada  |||||||||||||||*
*|||||||||||||||||||||||||||  B0P  1Z1  ||||||||||||||||||||||||||||||*
*|||||||||||||||||  Tel : 902-542-9912  (Room 128)  ||||||||||||||||||*
*|||||||||||||||  E-mail : 890758k@dragon.acadiau.ca  ||||||||||||||||*
***********************************************************************
From: henry@monod.biol.mcgill.ca (Henry A. Pasternack)
Newsgroups: comp.unix.questions
Subject: How to load and execute incrementally-linked modules?
Date: 26 Jan 93 19:35:28 GMT
Reply-To: henry@monod.biol.mcgill.ca (Henry A. Pasternack)
Organization: CAE Electronics


   I'm running a large, modular system under SGI Unix.  I'd like to add
a feature that allows me to "unlink" a module on the fly and "link" in
a replacement module that contains special debugging commands -- all
without stopping the main program execution.  I have read about the
'-A' incremental linking option of 'ld'.  What I'm wondering is how I
load the incrementally linked object module into the executing program.
Presumably, I need to inform the kernel tthat I plan to increase the
size of the process before I read in the new segments.  Can someone
fill me in on a practical approach to this problem?  Thanks.

-Henry
From: jason@studsys.mscs.mu.edu (Jason Hanson)
Newsgroups: comp.unix.questions
Subject: Programs to handle mailing lists, etc.
Date: 26 Jan 1993 04:56:22 GMT
Organization: Marquette University - Department MSCS
Distribution: world
Reply-To: jason@studsys.mscs.mu.edu (Jason Hanson)
NNTP-Posting-Host: studsys.mscs.mu.edu
Originator: jason@studsys.mscs.mu.edu

Where might I find a utility that can read the subject fields of my incoming
mail and work as a mailing list/server program?   Please respond in mail (I
don't normally read this group!)
-- 
Jason Hanson         |   915 W. Wisconsin Ave #1010   |     (414) 288-2179
Marquette University |   Milwaukee, WI 53233-2373     |     Ham Radio: N9LEA/AA
--  jason@studsys.mscs.mu.edu       ==+==       n9lea@n0ary.#nocal.ca.usa.na  --
Newsgroups: comp.unix.questions
From: raj@grok101.ColumbiaSC.NCR.COM ()
Subject: Re: [Q] tar destination across multiple volumes
Organization: Your Organization Here
Distribution: na
Date: Fri, 22 Jan 93 19:05:22 GMT

In article <1993Jan22.132609.5456@keinstr.uucp>, chaplin@keinstr.uucp (Roger Chaplin) writes:
|> 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"

You can use the multi-volume option of tar if you are using SVR4
as shown below:

tar -cvfk /dev/dsk/f03ht 250 /

The use of "-k" option with tapesize(in case 250k) will enable you to
use the multi-option of tar(1M).

-raj
1/22/93
Newsgroups: comp.unix.questions
From: ktf@bc3.gun.de (Klaus ter Fehn)
Subject: Re: How to add a list of numbers?
Organization: private
Date: Wed, 27 Jan 1993 20:26:26 GMT
X-Newsreader: TIN [version 1.1 PL6]

Mark Powell (mark@mark-one.inet-uk.co.uk) wrote:
 > 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?

 SUM=`ls -l | awk '
	NR > 1 { sum += $5 }
	END { print sum }'`

 - I split the lines because it is more readable.
 - The NR > 1 inside the awk-script is used to skip the 'total'-line.
-- 
LONDON ---*            *--- BERLIN                      Klaus ter Fehn
                *--- <ktf@bc3.gun.de>                   Neanderstr. 4
              {mcshh,smurf,unido}!easix!bc3!ktf    4000 Duesseldorf 1
   PARIS ---*      Tel.: +49-211-676331                 FRG / Germany
Newsgroups: comp.unix.questions
From: fish@daacdev1.stx.com
Subject: need VAX float to UNIX float function!!!
Organization: NASA Goddard Space Flight Center - Greenbelt, MD USA
Date: Thu, 21 Jan 1993 20:08:40 GMT

hi, we need a VAX float to UNIX (IEEE standard I suppose for
sgi/irix)

there must be such a beast out there already.

	thanx,
		fish
--
John R. Vanderpool     INTERNET: fish@eosdata.gsfc.nasa.gov
NASA/GSFC/HSTX         VOX: 301-513-1683                
"Does God look down on the boys in the barroom,
 mainly foresaken, but surely not judged."       -robert hunter
Newsgroups: comp.unix.questions
From: glenn@mips.bhpese.oz.au (Glenn McNally)
Subject: Re: Spell checker from inside vi
Organization: BHP, Newcastle, Australia
Date: Thu, 28 Jan 1993 05:30:49 GMT

raj@grok101.ColumbiaSC.NCR.COM (0000-Admin(0000)) writes:

>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

also try :%w !spell

Writes (w) all lines (%) to command (!) spell.

glenn
-- 
Glenn McNALLY   BHP Information Technology, Newcastle, NSW, Australia.
INTERNET: glenn@mips.bhpese.oz.au                PHONE: +61 49 402163
Newsgroups: comp.unix.questions,comp.unix.shell