HDTenEightyP/NetNews huggingface dataset:
From: htewari@cs.tcd.ie (Hitesh Tewari)
Subject: Excellent Book (more....)
Organization: Computer Science, Trinity College Dublin
Date: Thu, 12 Nov 1992 16:27:53 GMT

I posted an article about a good shell programming book recently, but
did not include the name of the publishers. Since then I have got a lot
of queries about it. So here it is once more:-)

	UNIX Applications Programming (Mastering the Shell)
By:	Ray Swartz
Pub:	SAMS (A Division of MacMillian Computer Publishing)
	11711 North College, Carmel, Indiana 46032 USA
	ISBN 0-672-22715-0

	This book is a must read for all you shell enthusiasts out there
	whether you are a novice or an expert user. It covers all the
	fundamental topics in great detail such as filters, regular
	expressions, sed, awk, sort, pipes, cut, join etc. It also
	has a full chapter on the awk programming language, the 
	process environment, shell functions and a great deal of very 
	relavant examples. I hope that you will get as much out of this 
	book as I did.
Hitesh
From: space@ncc1701.stgt.sub.org (Lars Soltau)
Newsgroups: comp.unix.shell
Subject: Re: Bourne Shell Programming Considered Harmful
Followup-To: comp.unix.shell
Date: 06 Nov 92 08:17:55 GMT
Organization: United Federation of Planets
NNTP-Posting-Host: ncc1701.stgt.sub.org
Content-Type: text/plain; charset=iso-8859-1
In-reply-to: dave@cs.arizona.edu's message of 4 Nov 92 19:48:32 GMT

>>>>> On 4 Nov 92 19:48:32 GMT, dave@cs.arizona.edu (Dave Schaumann) said:

> In article <Bx4Myp.Czr@unix.amherst.edu>, twpierce@unix (Tim Pierce) writes:
>>The command syntax really sucks, man.

> Are we talking about /bin/sh here?  Yah, the syntax of that is pretty
> bizzare.  What's worse, the man page (at least here) is really awful.
> Recently, I wanted to add a "case" to my .xsession file.  I could /not/
> figure out the syntax from the man page.  I finally gave up and asked.

> Is bash any better?

Bash has a "help" command for all builtins.
"help case" will tell you the correct syntax.
--
Lars Soltau	bang: <insert ridiculously long path>	    BIX: -- no bucks --
		smart: space@ncc1701.stgt.sub.org

Will ke
From: dansmith@Autodesk.COM (Daniel Smith)
Newsgroups: comp.unix.shell
Subject: Re: echo question
Date: 10 Nov 92 23:35:47 GMT
Organization: Autodesk Inc., Sausalito CA, USA

In <1992Nov9.171618.5675@midway.uchicago.edu> a-douglas@uchicago.edu (Allen Douglas) writes:

> I would like to echo tab and line return characters to the screen and/or 
> understandto a file. But I must not the escaping/quoting mechanism.  According
> to my UNIX reference I should be able to type:


	Forget the escape sequences.  They're not as portable as
combining echo with tr:

	echo 'first:this=that=other+second:this=that=other+' | tr '=+' '\011\012'

	Which gives:

first:this      that    other
second:this     that    other


	echo varies somewhat from platform to platform (and you didn't say
which one you were running on).  Using "tr" buys you some flexibility, at
the expense of not being able to print a character or two (like '+' or
'=' in my example).

				Daniel
-- 
     Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
	      Disclaimer: written by a highly caffeinated mammal
	    dansmith@autodesk.com            dansmith@well.sf.ca.us

From: kevinl@tisdec.tis.tandy.com
Date: 05 Nov 92 15:23 CST
Newsgroups: comp.unix.shell
Subject: Re: Variable substitution using Korn sh
Message-ID: <28300008@tisdec.tis.tandy.com>
Nf-ID: #R:lll-winken.LLNL.GOV:140617:tisdec.tis.tandy.com:28300008:000:479
Nf-From: tisdec.tis.tandy.com!kevinl    Nov  5 15:23:00 1992


	That was a great question.  I couldn't figure out how to do it,
so I asked on of my co-workers.  He showed me how, and I addapted it to
your question.  Here's what I have:

--Start--
:
echo -n "Enter environment variable: "
read variable

dirnam=$(eval echo $"$variable")

if [[ -d $dirnam ]]; then
	print $dirnam' to be scanned'
else
	print $dirnam' not found'
fi

exit 0
--Stop--

	This worked fine both in ULTRIX and SCO with Korn.

	Hope this helps.  It was interesting ;-)

Newsgroups: comp.unix.shell,comp.unix.question
From: lie6@ellis.uchicago.edu (Jonathan Lieberman)
Subject: Changing a 1 line zsh script to sh,perl,csh or tcsh etc.
Reply-To: lie6@midway.uchicago.edu
Organization: University of Chicago Computing Organizations
Date: Sun, 8 Nov 1992 02:01:33 GMT

How would I write this in sh, or perl, or csh, or tcsh?

#!/bin/zsh
ARGV0='-tcsh                                    .' $1 $2 $3 $4

Thanks.

-- 
____________________________________________________________________________
                            | People demand freedom of speech to make up 
Jonathan Lieberman          | for the freedom of thought which they avoid.
lie6@midway.uchicago.edu    |                        -Kierkegaard
From: dattier@ddsw1.mcs.com (DWT)
Newsgroups: comp.unix.shell
Subject: Re: how to get the last pos. parameter in ksh?
Date: 11 Nov 92 04:56:39 GMT
Organization: Contributor Account at ddsw1, Chicago, Illinois  60657

kuro@Eng.Sun.Com wrote in <KURO.92Nov9112643@vodka.Eng.Sun.Com>:

| How can I write a ksh function to examine the last parameter (argument)
| of the command line?  I.e., I'd like to know how to access argv[argc-1].
| I tried:
| 	${$#}
| but this was interpreted as ${$} yielding the process id of the shell.
| Another try:
| 	${@[${@#}]}
| gave me a syntax error.

Try

eval \${$#}

David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
Newsgroups: comp.unix.shell
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Bourne shell I/O
Originator: tchrist@pixel.convex.com
Date: Wed, 11 Nov 1992 01:05:15 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 ruck@zeta.ee.ufl.edu (John R Ruckstuhl Jr):
:On several occasions, I've seen posters to comp.unix.shell claim that
:there is no need to create temporary files in Bourne shell scripts --
:that proper use of redirection and the available file descriptors 
:(0-9 ?) are a better way to shuffle temporary data.
:
:I'm studying the man pages and I'm having trouble seeing how this works.
:
:Suppose I want to process stderr, then process stdout
:The solutions I see must use a tempfile.
:
:e.g.:
:
:$ (echo one >&1; echo two >&2) 2>&1 > tempfile | sed 's/^/stderr /'
:stderr two
:$ sed 's/^/stdout /' tempfile
:stdout one
:$ rm tempfile
:
:Do any of you know how to use redirection cleverly to avoid creating 
:(explicitly) tempfiles?

Yes.

:Or do you think I've misunderstood what the posters meant.
:Heck, there must be a reason for the extra file descriptors, right?

Yes.

Consdier this:

    exec 3>&1; grep yyy xxx 2>&1 1>&3 3>&- | sed s/file/foobar/ 1>&2 3>&-

or this:

    device=/dev/rmt8
    dd_noise='^[0-9]+\+[0-9]+ records (in|out)$'
    exec 3>&1
    status=`((dd if=$device ibs=64k 2>&1 1>&3 3>&- 4>&-; echo $? >&4) |
                egrep -v "$dd_noise" 1>&2 3>&- 4>&-) 4>&1`
    exit $status;



Those two examples were from the "Csh Considered Harmful" document.

This next one is from the Perl FAQ, but we're using traditional
shell redirection, so you should be able to adapt it to straight
shell.

    open (CMD, 
      "3>&1 (cmd args 2>&1 1>&3 3>&- | sed 's/^/STDERR:/' 3>&-) 3>&- |");

    while (<CMD>) {
      if (s/^STDERR://)  {
	  print "line from stderr: ", $_;
      } else {
	  print "line from stdout: ", $_;
      }
    }


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

        "There is no reason for any individual to have a computer in their
		 home."  (Ken Olson, President, Digital Equipment, 1977)
From: loveless@testament.bbn.com (Mary Loveless)
Newsgroups: comp.unix.shell
Subject: Help with shell script
Date: 9 Nov 92 16:06:39 GMT
Reply-To: loveless@testament.bbn.com. (Mary Loveless)
Distribution: usa
Organization: Bolt Beranek and Newman Inc., Cambridge MA
NNTP-Posting-Host: bbn.com

Hello,

I trying to learn shell programing and one of the exercises is to-

write my own grep program. Which searches a file for a given pattern,
just as grep does. For each line in the file that matches, print a "window"
around the matching line. That is, print the line preceeding the match, the
matching line, and the line following the match. Be sure to handle the
special cases where the pattern matches the first line of the file, and where
the pattern matches the last line of the file.

I'm  trying to use sed - with the following switches - h,x,n . My understanding
of sed is very limited(the book isn't that helpful) But, I'm not  sure  how  to
setup my script. Here is what I have so far -

        sed
        "h
         /"$1"/{
                x
                print
                x
                print
                n
                }" < filename


Am I on the right track?

If anyone can help me out I would greatly aprreciate it.

Thanks
Mary

email - loveless@bbn.com
phone - 617-873-5575
Newsgroups: comp.unix.dos-under-unix
From: peet@locus.com (J. David Peet)
Subject: "Enhanced mode Windows 3.1"-under-unix
Organization: Locus Computing Corp, Los Angeles
Date: Fri, 06 Nov 1992 03:03:00 GMT

In article <1992Nov04.233121.14754@blkbox> mknewman@blkbox (Marc Kraker Newman) writes:
>>>From article <1992Nov01.073037.0605446@locus.com>, by peet@locus.com (J. David Peet):
>>>> The next generation DOS Merge (soon to be available) simulates
>>>> 286 protected mode (called "standard mode" for Windows) in such
>>>> a way as to allow Windows 3.1 to run in standard mode.  An XMS
>>>> driver is used to allow access up to 16 megabytes to Windows.
>>... (Requires SVR4.2 or a update to SCO's kernel)
>...
>So when will ya'll get 386 protected mode working, so we can run Windows in
>enhanced mode?

It has not been decided.  Since you are asking for enhanced mode support,
would Win32s support be good enough given the hypothesis that Merge support
of standard mode is completely out of the question for your purposes?
(Most likely Win32s support would be easier to support than enhanced mode.)

What important applications do you have that don't work with standard mode?
How important would enhanced mode (or Win32s) be to you (i.e. how much extra
money would you pay to get this, if any, and/or would you just not buy the
whole product if such support is not available either as standard equipment
or an addon?).  If providing enhanced mode support was nearly as easy as
standard mode support, then we would have done that instead.
Of course, we all want to "have it all", but we need to see how important
this is balanced against other new good enhancements that we can spend our
time and resources on.

Thanks,
-David Peet
Newsgroups: comp.unix.dos-under-unix
From: voges@iai.kfk.de (Udo Voges,IAI Zi. 207,5725)
Subject: Problem with INSTALL of CDROM from IEEE EMBS Paris Oct'92
Reply-To: voges@iai.kfk.de
Organization: Kernforschungszentrum Karlsruhe (Germany)
Date: Thu, 12 Nov 1992 11:36:24 GMT

I tried to use a CDROM issued at the IEEE EMBS Conf. Paris Oct'92
using SoftPC on Sun. The INSTALL procedure (by Dataware Technologies, Inc.)
on the CDROM does not work. The message
	Insert Install Disk Number 1 and press ENTER when reay
is only given.
Any help suggestions??

---
Dr. Udo Voges
Kernforschungszentrum Karlsruhe GmbH
Institut fuer Angewandte Informatik
Postfach 3640, W-7500 Karlsruhe, GERMANY
Tel: +49-7247-82-5725
Fax: +49-7247-82-5070 or +49-7247-82-5786
email: voges@iai.kfk.de
From: evan@matadero.ncd.com (Evan Davis)
Newsgroups: comp.unix.dos-under-unix
Subject: SCO ODT Xterminal
Date: 6 Nov 92 20:25:53 GMT


Has anyone successfully or unsuccessfully run DOS in an xterm/odtterm/scoterm on 
an Xterminal?  Is it possible to have the mouse focus changed in an scoterm while displaying on an Xterminal?

I'm looking for any experiences in this area, any feedback will be helpful.

Evan
From: andrew@rentec.com (Andrew Mullhaupt)
Newsgroups: comp.unix.dos-under-unix
Subject: Re: Problem running DOS Merge under X11 windows
Date: 6 Nov 92 16:03:21 GMT
Organization: Renaissance Technologies Corp., Setauket, NY.

In article <1992Nov04.233121.14754@blkbox> mknewman@blkbox (Marc Kraker Newman) writes:

>So when will ya'll get 386 protected mode working, so we can run Windows in
>enchanced mode?

Is there any important reason why this is better than Standard mode under
UNIX? I would suppose that UNIX allows Standard mode to pretend that there's
lots of memory using UNIX's VM, and I will bet dollars to donuts that the
SysVR4 VM is far more efficient than Windows 386EM. Then there is the question
of 'true multitasking'. Why not open more than one desktop for those things
you want to run independently? So although emulating 386EM might provide some
facilities that you don't get in Standard mode, they don't look like big ones
to me. In fact, I would guess that with multiple users running Windows under
UNIX on the same host, 386EM will be _far_ slower than Standard mode in almost
all cases.

Later,
Andrew Mullhaupt
From: denised@pogo.wv.tek.com (Denise DiGiovanni)
Newsgroups: comp.unix.dos-under-unix
Subject: Re: SCO ODT Xterminal
Date: 10 Nov 92 21:11:09 GMT
Article-I.D.: pogo.13910
Reply-To: denised@orca.wv.tek.com
Organization: Tektronix, Inc., Wilsonville,  OR.

In article <14356@lupine.ncd.com> evan@matadero.ncd.com (Evan Davis) writes:
>Has anyone successfully or unsuccessfully run DOS in an 
>xterm/odtterm/scoterm on an Xterminal?  Is it possible to have the mouse 
>focus changed in an scoterm while displaying on an Xterminal? >

I am using a Tektronix XP337 X terminal to run Open Desktop version 2.0
from a 486. Page 327 and 328 of the ODT System Administrator's guide says
to set the XMERGE environment variable in order to have DOS services
display properly on a remote server.

I can open a DOS window on my X terminal by double-clicking on the DOS
icon in the Accessories window, and although I haven't actually run a 
DOS application from that window, the DOS menu allows me to chose the 
FOCUS menu choice, so one could assume it works. :-) What won't work
is Zoom and DOS colors; these choices are grayed out on the DOS menu.

****************************
*   Denise DiGiovanni      *
*    Tektronix, Inc.	   *
*   CGG Field Training     *
*    (503) 685-3019        *
* denised@orca.wv.tek.com  *
****************************
Newsgroups: comp.unix.dos-under-unix
From: mwaugh@utkvx1.utk.edu (marcie)
Subject: What is the best way to run DOS apps?
News-Software: VAX/VMS VNEWS 1.41    
Organization: University of Tennessee Computing Center
Date: Thu, 12 Nov 1992 20:29:00 GMT

My sincerest apologies for posting out of unmittigated ignorance, but I'm in
a time crunch and need some advice! Is there an application that will run
a DOS application under HP-UX 8.0 (on 9000/700 machine). The application is
one that uses a modem and deals with the creation of PCX files. To be 
precise, it is AccuWeather's application for accessing the weather, which
consists of both ASCII text and PCX format maps. The interface is very
unsophisticated and I am finding DOS to be a *pain* to deal with to manipulate
the files we recieve, and also it's difficult to automate the dialing. 
I only have information that SoftPc is a "dog", and am wanting to avoid
something that is messy, kludgey, and invasive on our nice (working) system.
Thanks in advance....

-------------------------------------------------------------------------------
888*********88888********88888********88888********88888********88888******8888
	Marcie                             email : mwaugh@utkvx3.utk.edu  
888*********88888********88888********88888********88888********88888******8888
-------------------------------------------------------------------------------
Newsgroups: comp.unix.dos-under-unix
From: mknewman@blkbox (Marc Kraker Newman)
Subject: Re: Problem running DOS Merge under X11 windows
Organization: The Black Box, PO Box 591822 Houston, TX 77259-1822 
Date: Wed, 04 Nov 1992 23:31:21 GMT

peet@locus.com (J. David Peet) writes:

>In article <24953@optima.cs.arizona.edu> dsiegel@optima.UUCP (Dave Siegel) writes:
>>From article <1992Nov01.073037.0605446@locus.com>, by peet@locus.com (J. David Peet):
>>> The next generation DOS Merge (soon to be available) simulates
>>> 286 protected mode (called "standard mode" for Windows) in such
>>> a way as to allow Windows 3.1 to run in standard mode.  An XMS
>>> driver is used to allow access up to 16 megabytes to Windows.
>>
>>
>>cool.  this is exactly what i want.  can you give us a release date on that?
>>
>>Also, for Dell users, and any other Unix that comes prepackaged with DOSMerge,
>>is there going to be an "upgrade" price available?  I certainly don't want to
>>wait till the next Issue of Dell Unix, and I don't think I wanna pay full
>>price...

>I did not give enough info in that last post.  This new DOS Merge required
>several changes to the base UNIX kernel in order to run Windows 3.1.
>These changes have NOT been done (yet) to SVR4.0.  They have been done to
>SCO Unix and to SVR4.2 (Destiny).  So, regardless, a kernel upgrade is
>needed.  Nothing except economic reasons prevent the kernel changes being
>made to SVR4.0.  I don't speak for Locus, (or Dell) in this, but it seems
>that by the time the kernel changes could be made, and put into an update
>for SVR4.0 (and tested, manufactured and distributed), most customers
>would rather get an upgrade to SVR4.2, which I expect the various resellers
>are getting ready real soon now.  Dell and other UNIX resellers are
>customer driven.  If enough ask for the new Merge on old SVR4.0 and don't
>want to upgrade to SVR4.2, then they will make the needed kernel changes
>available as an upgrade.  Personally I don't see this happening.  SVR4.2
>is so much better than SVR4.0 that I don't expect SVR4.0 to be around
>for very long once SVR4.2 starts shipping.  Make your want's known to
>Dell (or other current or future DOS Merge resellers).  They keed to know
>what customers want.


So when will ya'll get 386 protected mode working, so we can run Windows in
enchanced mode?


-- 
Marc K. Newman (N5SLG)			Is UNIX pronounced 
mknewman@blkbox.com 			"UNIQUES" or
PO BOX 591822				"EUNICHS"?
Houston, Texas 77259-1822
Newsgroups: comp.unix.dos-under-unix
From: ray@Celestial.COM (Ray Jones)
Subject: Re: What is the best way to run DOS apps?
Organization: Celestial Software, Mercer Island, WA
Date: Fri, 13 Nov 1992 17:01:19 GMT

In <12NOV199216290800@utkvx1.utk.edu> mwaugh@utkvx1.utk.edu (marcie) writes:

>My sincerest apologies for posting out of unmittigated ignorance, but I'm in
>a time crunch and need some advice! Is there an application that will run
>a DOS application under HP-UX 8.0 (on 9000/700 machine). The application is
>one that uses a modem and deals with the creation of PCX files. To be 
>precise, it is AccuWeather's application for accessing the weather, which
>consists of both ASCII text and PCX format maps. The interface is very
>unsophisticated and I am finding DOS to be a *pain* to deal with to manipulate
>the files we recieve, and also it's difficult to automate the dialing. 
>I only have information that SoftPc is a "dog", and am wanting to avoid
>something that is messy, kludgey, and invasive on our nice (working) system.
>Thanks in advance....

Marcie,
You might look into a product called PC Interface from Locus Computing.
This will allow you to network the PC to the HP, such that files stored
by the PC are actually on the HP.  Manipulate from the easy side.
-- 
INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Software
UUCP:   ...!thebes!camco!ray   6641 East Mercer Way
             uunet!camco!ray   Mercer Island, WA 98040; (206) 947-5591
Newsgroups: comp.unix.dos-under-unix
From: pingel@tinman (Bob Pingel (4439))
Subject: Serial Comms under SunPC 3.0
Organization: Allen-Bradley Co.
X-Newsreader: Tin 1.1 PL5
Date: Mon, 9 Nov 1992 17:46:26 GMT

I am attempting to do serial comms under SunPC 3.0.  I am having difficulties
with the control lines.

When I send out a packet I set RTS and clear DTR.  Upon receiving a 
transmit shift register empty (TSRE) I set DTR and clear RTS so that I can
receive again.  The last switch of the control lines takes up to 4 seconds.
Because of the time lag the device on the other end of the link has to wait
a while before it can send.

This same code works fine on a regular PC.  My comms driver is written
in assembly and I am diddling directly with the "UART" (no BIOS interface).

Any clues????

Bob Pingel


--
____________________________________________________________________________
                                                                 ___
 Robert M. Pingel (414) 382-4439                   /\           |   \        
 Electronic Operator Interface Development        /  \          |    |       
 Allen-Bradley Company - Milwaukee               /____\  _____  |----\       
 1201 South Second Street                       /      \        |     |      
 Milwaukee, Wisconsin 53201                    /        \       |____/       
                                           A Rockwell International Company
 Internet: pingel@oieng.mke.ab.com      
 MS Mail: abmke/oil/pingel
From: jka@windshear.larc.nasa.gov (J. Keith Alston)
Newsgroups: comp.unix.dos-under-unix
Subject: accessing NOVELL from SCO-ODT
Date: 11 Nov 1992 00:49:17 GMT
Organization: NASA Langley Research Center, Hampton, VA  USA
Distribution: world
NNTP-Posting-Host: windshear.larc.nasa.gov
Originator: jka@windshear.larc.nasa.gov


Hi,
   I'm running SCO ODT. I need to know if there is any way that
   ODT's DOS under unix can access a novell network? Or is there any
   way that the novell net can be accessed directly from SCO unix?
   any ideas/information would be greatly appreciated. Thanks.

-Keith Alston
 jka@windshear.larc.nasa.gov

   
-- 
************************      Don't just do it!     ***********************
Lockheed Eng. and Sci. Co./Nasa Larc|J. Keith Alston jka@windshear.larc.nasa.gov
From: mikes@moose.cs.indiana.edu (Michael Squires)
Newsgroups: comp.unix.dos-under-unix
Subject: Re: accessing NOVELL from SCO-ODT
Date: 12 Nov 92 06:22:32 GMT
Article-I.D.: news.1992Nov12.112239.28619
Organization: Indiana University, Bloomington

In article <1dpladINNknj@rave.larc.nasa.gov> jka@windshear.larc.nasa.gov (J. Keith Alston) writes:
>
>Hi,
>   I'm running SCO ODT. I need to know if there is any way that
>   ODT's DOS under unix can access a novell network? Or is there any

I'm running two DOS sessins under ODT 1.1.  To do thisI

1.  Installed one 3C501 card per session, and ran mkdev e3A for each
    card (but not mkdev tcp)

2.  added entries to the file that stores DOS Merge hardware information
    (sorry, not at the system, but it's obvious from the FM)

3.  Ran DOS wit "dos +a3c501a" where 3c501a is the entry for one of the
    two cards

4.  I've been able to do everything but mount the UNIX partition with this;
    if you load e EMS 4.0 driver you can put EMSNETX in EMS memory.

    PART.SYS is the driver that allows you to mount multiple filesystems.

5.  Performance is good, reliability is good; I have run EMONITOR and
    the Charon 2.0A Novell to UNIX printer bridge under DOS Merge.


The Ethernet card cannot use DMA and I've avoided those that use shared
memory, thus the 3c501.
-- 

Mike Squires (mikes@iuvax.cs.indiana.edu)     812 855 3974 (w) 812 333 6564 (h)
mikes@iuvax.cs.indiana.edu          546 N Park Ridge Rd., Bloomington, IN 47408
Newsgroups: comp.unix.misc