HDTenEightyP/NetNews huggingface dataset:
From: mich@lin.infolog.se (Thomas Michanek)
Subject: Need help understanding sed
Organization: Infologics, Linkoping, Sweden
Date: Fri, 22 Jan 1993 21:08:55 GMT


I've started to use 'sed' a lot, not only for simple 's/.../.../'
substitutions, but I have trouble understanding the man page for sed
when trying to using more complex commands. Could someone help me
with the following issues:

1. The man page sais:

     Some commands use a hold space to save all or  part  of  the
     pattern space for subsequent retrieval.

   However, I can't find _which_ commands do that and how. I've tried
   using the g, G, h, H, x commands, but sed produces no output.

2. "\n" in a context address is supposed to match a NEWLINE in the
   pattern space. But doesn't sed read one line at a time into the
   pattern space, each line separated by NEWLINE?

   I want to look for files containing the pattern "A" in one line
   and the pattern "B" in the next line. The following doesn't work:

     sed '/A\nB/p'

   How can you do such a 'multi-line grep'?

3. What's the difference between the commands n and p? The man page sais 
   n copies the pattern space to stdout, but it has never worked for me.

4. What's the syntax for the { } command grouping? No matter how I try
   I get "Extra text at end of command" or "Unrecognized command".

   Isn't sed '/A/{=;p}' supposed to print the line number and the pattern
   on stdout? I've tried quoting, backslashing, spaces, no semicolon etc.

BTW, I'm using C shell on SunOS4.1.1 and "sed0.c 1.15 89/03/28 SMI".

Your aid is urgent and welcome!!!

.- - - - - - - - - - - -.  _ _  _ ___ _  _   _   _  _  _  _   .- - - - - - - -.
|    Thomas Michanek    |  | |\ | |_ / \ |  / \ / _ | / `|_`  | Dial +46 13   |
|  Infologics Linkoping |  | | \| |  \_/ |_,\_/ \_| | \_,._|  | 210060  Phone |
| email:Thomas.Michanek |          _                          | 210068  Direct|
|       @lin.infolog.se |  L I N K O P I N G  -  S W E D E N  | 210155  Fax   |
`- - - - - - - - - - - -'                                     `- - - - - - - -'
From: nickel@cs.tu-berlin.de (Juergen Nickelsen)
Newsgroups: comp.unix.questions
Subject: Re: So what _is_ so good about vi?
Date: 25 Jan 1993 23:47:43 GMT
Organization: STONE Project, Technical University of Berlin, Germany
	<1993Jan25.020355.6180@robohack.UUCP>
	<1993Jan25.134932.982@maths.tcd.ie>
Reply-To: nickel@cs.tu-berlin.de
NNTP-Posting-Host: tempest.cs.tu-berlin.de
In-reply-to: pmcauley@maths.tcd.ie's message of Mon, 25 Jan 1993 13:49:32 GMT

In article <1993Jan25.134932.982@maths.tcd.ie> pmcauley@maths.tcd.ie
(Paul Mc Auley (in the Pearse St. Lab)) writes:

> While we're at it, does anyone have a canonical list of "undocumented"
> features?
> 
> eg: abbreviate: This allows you to type in a word to get a different one..
> 	:ab adn and

This is documented in the "Ex Reference Manual" by Joy and Horton. In
Version 3.7 (which belongs to the 4.3 BSD) it reads in section 7
(Command descriptions):

abbreviate word rhs				abbr: ab
    Add the named abbreviation to the current list. When in input mode
    in visual, if word is typed as a complete word, it will be changed
    to rhs.

--
Juergen Nickelsen
From: brandy@rintintin.Colorado.EDU (BRANDAUER CARL M)
Newsgroups: comp.unix.questions
Subject: Re: Question on sed
Date: 25 Jan 93 18:21:22 GMT
Organization: University of Colorado, Boulder

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 'ed' instead of 'sed'.  There may be a few differences you might have
to watch for, but you'll gain the advantage of using line numbers etc.
Newsgroups: comp.unix.questions
From: root@candle.uucp (Bruce Momjian)
Subject: Re: History in ksh?
Organization: a consultant's basement
Date: Thu, 21 Jan 1993 14:19:15 GMT
X-Newsreader: TIN [version 1.1 PL6]

Chaim Manaster (manaster@yu1.yu.edu) wrote:
: 
: The UNIX book I have only describes using history in the csh, but
: does't say a word about how to use (or set up) history in the ksh.
: Could anybody give me the basics that I can use until I get a hold
: of a book that does describe history in the ksh.
: 
: Primarily, I need info on how to set it up (what to put in .kshrc
: or any other needed file to set up history) and how to pull up some
: previous command, modify it and reissue it.
:

Add this to your .kshrc file:
	set -o emacs
	alias __A=^P
	alias __B=^N
	alias __C=^F
	alias __D=^B

Now the ^P is really a control-P in the file.  The __? alias works as an
alias for ESC-[-?.  This is mentioned in some ksh manual pages, not in
others.  This assumes ANSI-compatable cursor keys.

You also need to set ENV to point to your ksh startup file, too.
-- 
Bruce Momjian                          |  830 Blythe Avenue
root%candle.uucp@bts.com               |  Drexel Hill, Pennsylvania 19026 
  +  If your life is a hard drive,     |  (215) 353-9879(w) 
  +  Christ can be your backup.        |  (215) 853-3000(h)
From: woodard@troll.Eng.Sun.COM (Mike Woodard)
Newsgroups: comp.unix.questions
Subject: What program creates files with .F extensions?
Keywords: .F extension
Date: 28 Jan 93 00:13:56 GMT
Reply-To: woodard@troll.Eng.Sun.COM
Followup-To: poster
Organization: Sun Microsystems, Inc.
NNTP-Posting-Host: troll

I would guess some kind of compression program. I just
need to undo whatever was done. Thanks in advance.

M

---
Mike Woodard
woodard@eng.sun.com
Newsgroups: comp.unix.questions
From: jhgreen@cs.sandia.gov (Jethro H. Greene)
Subject: Re: writing into an exported filesystem
Organization: Sandia National Laboratories, Albuquerque, NM
Date: Sat, 16 Jan 93 15:29:41 GMT

In article <35071@adm.brl.mil> GEANEL@cn.laafb.af.mil writes:
>As a superuser, I exported a filesystem from a Sun workstation.  
>Afterwards I mounted this exported filesytem onto a second Sun 
>workstation. Do any of you know why I can read but not create a file from the 
>second workstation when I am inside the mounted filesystem which was exported 
>by the first host? Typing "exportfs -a -o root=[name of second host]" from 
>the first host did not solve the "permission denied" error message. I do not 
>have NIS running.

Does /etc/fstab show read and write?

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

Newsgroups: comp.unix.questions
From: sumargoh@serss0 (H. Sumargo)
Subject: Finding the execution time of a program.
Organization: Florida International University, Miami
Date: Thu, 28 Jan 1993 00:09:53 GMT

I am trying to calculate the execution time of a program I run.  What C commands
can I use in the program to get the start time and the end time from any points
within the program so as to calculate the execution time?  Is there another way
(easier, faster?) with external UNIX commands?

Please reply to: frank@vision.fiu.edu

thanks,
Frank Candocia
From: ianm@icsbelf.co.uk (Ian Moran)
Newsgroups: comp.unix.questions
Subject: COBOL compiler source code
Date: 28 Jan 93 09:50:53 GMT
Organization: ICS Computing Group Ltd, Belfast
X-Newsreader: TIN [version 1.1 PL8]

Somewhere out there exists source code for a COBOL compiler. Could someone
please point me in the right direction. Thanks

 Ian


--

Ian Moran                    Internet:  ianm@icsbelf.co.uk
ICS Computing Group Ltd.                imoran@cix.compulink.co.uk
Belfast                      UUCP:      ...{uknet,uunet,mcsun}!icsbelf!ianm 
N. Ireland.                  Fidonet:   2:252/309.6
From: lad@remus.rutgers.edu (Kamlesh)
Newsgroups: comp.unix.questions
Subject: tar, directory checksum error
Keywords: tar
Date: 28 Jan 93 02:52:07 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


	I get the error,

	"directory checksum error"

	when I try to extract a certain file from a tar archive.

	Does this mean that the tape is bad?

	Can the file be recovered?

-Kamlesh Lad
lad@remus.rutgers.edu
Newsgroups: comp.unix.questions
From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
Subject: Re: replacement for vi
Organization: CIRES, University of Colorado
	<EJH.93Jan18200012@khonshu.colorado.edu>
	<1993Jan22.170621.19062@news.eng.convex.com>
Date: 25 Jan 93 12:11:57

In article <1993Jan22.170621.19062@news.eng.convex.com> Tom Christiansen <tchrist@convex.COM> writes:

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

Ah, the inflexibility of the aged.

Be not so quick to judge my work, Tom, since you've probably never
even seen it. I too am a world-class programming artist.
--
	Don't blame me, I voted against Amendment 2!

Edward Hartnett				ejh@khonshu.colorado.edu

Newsgroups: comp.unix.questions
From: brent@uwovax.uwo.ca (Brent Sterner)
Subject: Re: History in ksh?
Organization: University of Western Ont, London
Date: Fri, 22 Jan 1993 15:16:11 GMT

In article <1993Jan21.141915.3359@candle.uucp>, root@candle.uucp (Bruce Momjian) writes:
> Chaim Manaster (manaster@yu1.yu.edu) wrote:
> 
> Add this to your .kshrc file:
> 	set -o emacs
> 	alias __A=^P
> 	alias __B=^N
> 	alias __C=^F
> 	alias __D=^B
> 
> Now the ^P is really a control-P in the file.  The __? alias works as an
> alias for ESC-[-?.  This is mentioned in some ksh manual pages, not in
> others.  This assumes ANSI-compatable cursor keys.

   The system I work on is AIX.  I'm very new to unix in general, and really
   appreciated the following uuencoded form of the above, especially since I
   had no idea how to create control characters within a file.

table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 .filespec
M<V5T("UO(&5M86-S"@IA;&EA<R!?7T$](A B(" @(" @(" C(')E8V%L;"!Pz
M<F5V:6]U<R!L:6YE"F%L:6%S(%]?0CTB#B(@(" @(" @(",@9V]T;R!N97ATy
M(&QI;F4*86QI87,@7U]$/2("(B @(" @(" @(R!G;R!B86-K(&EN(&$@;&ENx
M90IA;&EA<R!?7T,](@8B(" @(" @(" C(&=O(&9O<G=A<F0@:6X@82!L:6YEw
!"@IAv
 u
end

   Further, if you happen to be running AIX, you require PTF U406855
   for ksh in AIX 3.2 to make it all behave.

   Hope this is useful to someone.  b.
--
Brent Sterner				AIX System Manager Apprentice
Fast:		<BRENT@uwovax.uwo.ca>	<129.100.2.13>
Medium:		(519)661-2151 x 6036	Fax:   (519)661-3486
Slow:  Computing & Communications Services, Natural Sciences Building
       The University of Western Ontario, London, Ontario, Canada  N6A 5B7
Newsgroups: comp.unix.questions
From: tech@tau.ac.il (ONYX tech)
Subject: printer management with NQS.
Organization: Tel-Aviv University Computation Center
X-Newsreader: TIN [version 1.1 PL8]
Date: Sat, 23 Jan 1993 20:43:07 GMT

Hi!

I've installed NQS on a few unix computers (SPARC & MIPS) and i'm having problems configurating an NQS  device (ie: Printer).
Does anyone use this badly documented option of NQS?
If you do i would be happy to hear what i should put in the create device command.

Thanks,   Yossi Goltz  Emial: tech@ccsg.tau.ac.il
From: chris@visionware.co.uk (Chris Davies)
Newsgroups: comp.unix.questions
Subject: Re: can unix rpc procedure accept more than one parameter
Date: 25 Jan 93 18:36:26 GMT
Organization: VisionWare Ltd., Leeds, UK
X-Newsreader: Tin 1.1 PL5

Wing Ho Kwan - Louie (890758k@dragon.acadiau.ca) wrote:
: Another question in unix rpc

Sun RPC?

> Do anyone knows how many parameters can pass to procedures.
One - in Sun RPC.  But it can be a structure or a union containing
several members.

I'm sure the guys from DEC or HP/Apollo will give details for their
implementations of RPC  :-)

> (is it quite limited ????!!!!)

No.  Just convoluted.


Chris
--
            VISIONWARE LTD, 57 Cardigan Lane, LEEDS LS4 2LE, England
  Tel +44 532 788858 x238.  Fax +44 532 304676.  Email chris@visionware.co.uk
---------- "VisionWare:   The home of DOS/SQL/UNIX/X/VMS integration" ---------
Newsgroups: comp.unix.questions
From: allanon@sdf.lonestar.org (Kenneth Leung)
Subject: SUNsoft PC NFS 4.0 with SCO NFS 1.1.1 problems, help?
Organization: sdf full-shell Public Access Unix - Dallas, TX - 214/436-3281
Distribution: usa
Date: Wed, 27 Jan 1993 21:45:27 GMT

We are currently running a Cabletron Ethernet network with TCP/IP, SCO
Unix and DOS PCs with SUNsoft's PC NFS.

We can use PC NFS with our SUN station without any problems, both drives
and printer mounting works properly.

We install SCO NFS 1.1.1 on our SCO Unix machines, and the DOS PC NFS 
with recognize the SCO Unix machine as an authentication server.  When
we try to mount drives we get the error "NFS158F Mount Request Failed"

I am getting bounced between SCO and SUNsoft's tech. support over this.
I would appreciate any who can give me some pointers on what is wrong....

Thanks in advance......


-------------------------------------------------------------------------------
Kenneth C.P. Leung      /Sweda Division       --  Point of Sales Systems Co.
Innovax Concepts Corp.  
1303 Walnut Hill Ln. 2nd Floor Irving TX 75038   Tel. 214-550-8371 x6828
-------------------------------------------------------------------------------

-- 
-------------------------------------------------------------------------------
Kenneth C.P. Leung      /Sweda Division       --  Point of Sales Systems Co.
Innovax Concepts Corp.  \Outsourcing Division --  Systems Planning & Consulting
1303 Walnut Hill Ln. 2nd Floor Irving TX 75038   Tel. 214-550-8371 x6828
Newsgroups: comp.unix.questions
From: mich@vmars.tuwien.ac.at (Michael Schuster 8726004 (Dipl Joe))
Subject: Re: Soft link
Organization: Technical University Vienna, Dept. for Realtime Systems, AUSTRIA
Date: Thu, 28 Jan 1993 09:51:13 GMT

zheng@cs.sunysb.edu (Xiaohong Zheng) writes:

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

That's not so: if you do as above, you'll get something like:

	/tmp/.plan: No such file or directory

when you try to access/read/write it.

-- 
Michael Schuster 		| Place the quote: (author, characters ... )
TU Vienna, Austria		|    "Coincidence was his father and luck his
mich@vmars.tuwien.ac.at		|       inheritance"
+43/1/58801/8181 (sometimes)	|	replies will be rewarded a cookie.
Xref: sparky comp.unix.questions:15795 comp.unix.shell:5448 news.answers:5366
From: tokero@bode.eng.ohio-state.edu (Onur Toker)
Subject: ********** A QUESTION ABOUT MCONNECT **********
Organization: The Ohio State University Dept of Electrical Engineering
Distribution: na
Date: Fri, 22 Jan 1993 03:15:48 GMT


	Yesterday I learned the unix command

		mconnect

to connect to a SMTP mail server. And by using this program one can
send mail with a different name.

	I want to ask whether there is a similiar command to post something
to a newsgroup. Of course I am not asking about Pnews or inews, what I
ask is whether there is a command or method to post with a different name?

	Thanks,

	Please reply by e-mail.
Newsgroups: comp.unix.questions,comp.dcom.lans.ethernet
From: brucek@uni.ins.com (Bruce Klein)
Subject: How to determine ethernet utilization using UNIX?
Organization: International Network Services
Date: Fri, 22 Jan 1993 22:37:03 GMT

A friend and I have been debating about how to use a UNIX workstation
to determine the ethernet utilization of the segment that the
workstation is on.  

I have seen programs that can do this. For example, sun's traffic
program will graph utilization (but unfortunately has no command line
interface). I am further guessing that there is some device independent
method, because there are a few Macintosh programs floating around
that will tell you utilization and don't seem to care what kind of
Ethernet card you have.

Here are the strategies we've considered so far:

1. Run an SNMP agent on the workstation and query it. Unfortunately,
the standard MIBs don't have Ecarrier or Etime, which is what we
really want. Alternatively, we thought we could put the card in
promiscuous mode and query InOctets and OutOctets, but that doesn't
sound like its exactly what we're looking for. Even worse, the only
public domain UNIX snmpd that we've seen so far won't report InOctets
anyway.

2. Use standard utilities like netstat. The problem here is that
all the ones we've seen report packets, not actual bits on the wire.
I guess you could perform a rough estimate based on packets, but
you'd never really know how accurate you were. 

Does anyone know how this is done in practice? Any tips or pointers
would be greatly appreciated.

Thanks,

Bruce Klein
Systems Engineer
International Network Services
brucek@ins.com   (408)-496-1404
Newsgroups: comp.unix.questions
From: hurd@fraser.sfu.ca (Peter L. Hurd)
Subject: Sparcs10+HP III+PC-NFS form feed hassle, newbie Q
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Mon, 25 Jan 1993 18:53:37 GMT

Hi a bunch of newbies have got a couple of PCs hooked up to a SPARCs10
using PC-NFS.  Also hooked up to the SPARCs is an HP III+.  Being the 
newbies that we are, we"re totally frustrated by this extra page that
pops out when we print from the PCs.  Now as far as we can figure, DOS
print format includes a page break character at the end to spit out that
page.  Unix adds on one of it"s own and we get two pages out.  We can find
no ^E (damn swedish keyboard hope that looks like a control-E to you) to
delete.  When we do something like cat filename (if this wasn"t a swedish
keyboard I"d put a greaterthan symbol there for you but I can"get it to do
that just now) /dev/bpp0 we get filename and then have to hit formfeed to
get the last page out.  If we do unix2dos filename (pipe symbol) lpr then
we get nice results.  These last two examples being obviously our attempts
to print off the sparcs propperly.  What do we try next?  (please don"t
tell me to learn swedish and then RTFM  :-)  ).
  Please send replies to hurd_p@zoologi.su.se  since I can"t read posts
on the address I"m posting from.  (I"m trying to convince the bossman
to hook us up to the net, so a lot of handy wizardry would buy me a lot of
net access leaverage.  Thanks in advance.

-- 
Pete Hurd, hurd@sfu.ca| Q: Why did the Jungle Fowl cross the road?          |
Behavioural Ecology   | A: To maximize it's lifetime reproductive success   |
Dept.Biol.Sci., SFU.  | Q: Huh?                                             |
Burnaby B.C., Canada  | A: I guess it just needed to get to the other side. |
Xref: sparky comp.unix.questions:15946 comp.unix.misc:5010
From: lhb@isds.duke.edu (Leslie H. Boyd)
Newsgroups: comp.unix.questions,comp.unix.misc
Subject: Mac software on Sun O/S
Keywords: Mac Sun O/S
Date: 26 Jan 93 04:02:23 GMT
Followup-To: poster

Hello:

   I am intrested in any software that will run Mac software
   on Sun boxes.

   As usual, thanks in advance for you assistance.
Newsgroups: comp.unix.questions
From: pfcouvar@unix.amherst.edu (Peter F. Couvares)
Subject: How do I run a mailing list?
Organization: Amherst College
Distribution: usa
Date: Fri, 22 Jan 1993 02:04:53 GMT

	How does one start/maintain a simple mailing list (assuming a
cooperative machine administrator)?

Please reply via email, and I'll post the answers if there's interest.
Thanks,

-Peter

-- 
pfcouvar@unix.amherst.edu (Peter Couvares)
From: ELLIOTT1@ccf2.nrl.navy.mil (ANDRE S. ELLIOTT)
Newsgroups: comp.unix.questions
Subject: help !!!
Date: 27 Jan 93 15:07:11 GMT

Hello,
Could someone please send me the information on how to subscribe to the
info-unix mailing list. Thanks in advance.

                                Andre S. Elliott
                                [elliott1@ccf.nrl.navy.mil]
From: jason@studsys.mscs.mu.edu (Jason Hanson)
Newsgroups: comp.unix.questions
Subject: Program to Trace Route of Telnet/FTP connection
Date: 26 Jan 1993 04:55:05 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

  I am looking for a program that will monitor a TELNET or FTP session and give
me the machines the transmissions went through (ie. the complete path).  Since,
I do not normally read this newsgroup, please respond through mail!  Thanks!
-- 
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  --
From: harley@engrhub.ucsb.edu (Harley Hahn,,,HAHN,personal)
Newsgroups: comp.unix.questions
Subject: The Fundamental Theorem of Perl
Date: 22 Jan 93 03:10:25 GMT

Recently, a simple solution to a sorting problem...

>:The following sort command works just fine:
>:sort -t. +0n -1 +1n -2 +2n -3 +3n -4
>:
>:With some small changes this could sort the internet number anywhere in the
>:line.

was offered.  However, Tom C. showed how for difficult data
the simple solution might not be enough...

>Really?  Please show me how to sort the following lines by the
>first occurring Internet address on each line:

{omit sample data in which numbers are irregular}

>I believe you cannot without great effort devise a /usr/bin/sort solution
>where the Internet number falls in different places on different lines, or
>one in which the host number is a class A or B address in two- or three-dot
>notation.  The following hunk of perl code, on the other hand, manages
>quite well:

{omit clever Perl program}

------------

I think I have just figured out the Fundemental Theorem of Perl:

                   =====================================
                     THE FUNDAMENTAL THEOREM OF PERL
                   =====================================

                   As you make a problem more and more complex,
                   you will eventually reach the point where it
                   becomes necessary to use Perl.

                   ==================
                   Harley's Corollary:
                   ==================
                   Any problem can be made to require Perl
                   by expanding the set of input data to be 
                   sufficiently complex.

                   =====================================


-- Harley Hahn
Newsgroups: comp.unix.questions,comp.dcom.lans.ethernet