HDTenEightyP/NetNews huggingface dataset:
From: mario@wdc.sps.mot.com (Mario Nigrovic)
Subject: BOURNE - exec >/dev/null 2>&1 wierdness
Organization: Motorola Western MCU Design Center, Chandler Arizona
Date: Wed, 30 Dec 1992 19:09:32 GMT

Hello,
   I am writing a Bourne shell script and am having some strange
interactions seemingly caused by exec >/dev/null 2>&1.  Let me
provide some details:

   Sun Sparc2, 4.1.1b

   I have a function called verify_tape which internally might just
want to create a log file.  After I've created it, and before I can
mail the log file to the administrator, I want to close it, right?
So I do the exec >/dev/null 2>&1.  Seems to work just fine, except
that MUCH later on, when I run dump(8), all it's output gets lost,
DESPITE THE FACT that I've exec'd to a new log file before then.

   I fixed this above problem by kicking the function calls into
subshells, but this still leaves me confused.  Furthermore, I am now
having a similar problem with Mail, because again I've closed the
log file before mailing it.

 
   This whole thing seems to me to be a bit of a mess; is there
really anything dangerous (or permanent) about redirecting the shell's
outputs to /dev/null?

   Please respond via E-Mail, and I'll summarize if requested.  The
correct email address appears below.  Thanks for your time.

							Mario

Mario Nigrovic <mario@wdc.sps.mot.com>		voice: (602) 821-4264
Motorola Western MCU Design Center		fax:   (602) 821-4058
*  -  -  -  -  -  -  -  -  -  -  -*-  -  -  -  -  -  -  -  -  -  -  *
I profoundly believe it takes a lot of practice to become a moral
slob.
		-- William F. Buckley
*  -  -  -  -  -  -  -  -  -  -  -*-  -  -  -  -  -  -  -  -  -  -  *
Newsgroups: comp.unix.shell
From: mcdono@nosc.mil (Tim McDonough CSC Room 191 Phone 553 3102 )
Subject: Re: wanted: tutorial about sh programming
Summary: Csh formatting
Reply-To: mcdono@nosc.mil
Organization: NCCOSC, NRaD Division
Date: Wed, 23 Dec 1992 19:18:53 GMT


I'd like the following line to produce the output below it.

echo "Hostname is " $system "   Host id is " $hostid

Hostname is foo     Host id is 78454
Hostname is fooobar Host id is 89000

I tried removing the quotes to no avail, any ideas?
mcdono@sunspot.nosc.mil


---
Tim McDonough                   |   The opinions voiced are my own and
Computer Sciences Corp.         |   do not reflect those of my employer
mcdono@sunspot.nosc.mil         |   or the Susquehanna Hat Company.
From: markp@adsi.homecare.com (Mark Parr)
Newsgroups: comp.unix.shell
Subject: Bourne Shell Limits
Date: 24 Dec 92 19:57:36 GMT
Organization: Application Data Systems, Inc.

Does anyone know if there is a point in the Bourne Shell where large program
application sizes can cause problems with system() calls?

99% of our application is written using the Visual COBOL/XO Compiler.  I'm
working on a C application that needs to be able to read/write from/to the
COBOL files.  For this, I've written some Cobol routines that I call
out of my application.  The application is linked in with the need Visual
libraries and results in a program that 200k+ in executable size.

Now, in this application, I system() call out to Unix in several places.
The problem occurs with a system() call using "find".  For testing purposes,
I replaced the "find" with "sh" so that I could "shell" out to the prompt.
When I type "find" at the prompt (this is on an IBM Risc/6000 but similar
problems have been noted on our NCR 750 Tower), I get a message along the
lines of:  "Find cannot execute 'pwd'".  

Now, from this shell, if I start either "ksh" or "csh" and type "find", 
I get the format instructions for using find.  Another, "sh" session,
however, returns the error.

Also, if I shell out to "sh" immediately after main(), find works as 
expected.

Can anyone give me any ideas on what the problem might be or where to look?

Thanks,
Mark Parr


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 | |-------------|  Application Data Systems     |  Phone: (601) 393-2046  | |
 | |  Mark Parr  |  1930-B 1st Commercial Dr. N  |    Fax: (601) 393-6605  | |
 | |-------------|  Southaven, MS 38671          |    markp@adsi.vp.com    | |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.unix.shell
From: gary@netcom.com (Gary Messenbrink)
Subject: ?Determine shell from withing a program?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: us
Date: Sun, 3 Jan 1993 05:24:13 GMT

Hi again,
When I asked this question before, I apparently did not give
enough background information.  I have a program that
outputs a string that is to be executed by a shell.  It
currently works only for ksh.  An example follows.
    eval `program`
This causes program to execute and produce a string which
then gets passed to the shell for processing.
The problem is that I do not know how to determine what shell
was usedto invoke the eval command.  The program is to be
distrbuted to other machines on a network where it will not be
possible for me to enforce what shell is in use.  I do not want 
to have a difference version of the program for each shell.

Several people have suggested using a variable called SHELL, but
it is non-standard and even where it is used, it is very easy
to cause strange results.  For example, if the variable is
set to KSH when running ksh and one enters csh, the c shell
is started but the value of SHELL is still KSH.

Sorry this got so long.  I really appreciate the responses
received to date.  If anyone has any other ideas, please post
or email.

Thanks again,
Garyi
-- 
========================================================================
|   Gary Messenbrink                 gary@netcom.com [192.100.81.100]  |
========================================================================
From: adam@endor.uucp (Adam Shostack)
Newsgroups: comp.unix.shell
Subject: Re: too many values in environment
Date: 23 Dec 92 21:15:03 GMT
Article-I.D.: das.1992Dec23.211503.8335
Organization: Aiken Computation Lab, Harvard University

In article <BzoDt8.K3A@nit.pactel.com> eric@nit.pactel.com (Eric Pederson) writes:
>I am running SunOS 4.1.x and C-shell.  According to TFM, the maximum
>amount of space that argv[] and envp[] may take up is returned
>by sysconf(2).  On my machine the value is 1 megabyte.  However, my
>shell doesn't want to accept more than 100 environment variables.
>Since I am running some applications that require a zillion variables
>to be set before I run them, this limitation is a pain.

I know you found that printenv fixes this, but I wanted to add that
you can avoid setting all those variables. Put ~/bin at the start
of your path and fill it will short shell scripts that set the
environment variables you need and then call the main program.  Its
slightly slower than setting them all at startup, but I find it
convineint not to set 600 zillion environment variables in my .login.

Adam

Adam Shostack 					adam@das.harvard.edu

What a terrible thing to have lost one's .sig.  Or not to have a .sig
at all.  How true that is.
From: chip@midnight.seas.upenn.edu (Charles H. Buchholtz)
Newsgroups: comp.unix.shell
Subject: Re: Opening up remote xterm windows?
Date: 24 Dec 92 18:54:55 GMT
Organization: University of Pennsylvania

hellmann@cs.scarolina.edu (Doug Hellmann) writes:
>To rlogin (or telnet) to another site: (note that it also allows you to
>start up other X clients on the foriegn machine and display on your machine)
>
>(/usr/bin/X11/xhost +; /usr/bin/X11/xterm -cb -title gondwana -e rlogin gondwana.geol.scarolina.edu&)
>

Note that this also allows *everyone* on the network to attach to your
display.  Not only does this mean that anyone can open up windows on
your display, but they can also read your display, do keystroke
monitoring, and read your passwords as you type them.

Better by far is to use the xauth command, which limits access to
people who have read access to your .Xauthority file(s).

If you must disable the xauth authentication system, then at least use
"xhost +gondwana.geol.scarolina.edu", which only gives everyone on
that one machine read/write access to your display, not the entire
world.

Charles H. Buchholtz                           chip@seas.upenn.edu
Systems Programmer                             (215) 898-2491
School of Engineering and Applied Science      200 S. 33rd St, rm 154
University of Pennsylvania                     Philadelphia, PA 19104
Newsgroups: comp.unix.shell
From: kasajian@netcom.com (Kenneth Kasajian)
Subject: cp
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Thu, 31 Dec 1992 22:19:46 GMT


How do I copy all the files in the current directory into a subdirectory
name 'sub'.  I do :
cp * sub/
but then it tries to copy all the subdirectories as well.  I've tried
doing :
cp `find . -type f -print` sub/
but find finds all files below the current, not just the current directory.
I guess I can use ls, but how do I get ls to only display the files only
and not directories?
From: ksakai@mtl.t.u-tokyo.ac.jp (Kiyotaka Sakai)
Newsgroups: comp.unix.shell
Subject: Re: cp
Date: 2 Jan 93 09:40:16 GMT
Organization: University of Tokyo, Tokyo, Japan.
In-reply-to: kasajian@netcom.com's message of 1 Jan 1993 07:19:46 JST

In article <1992Dec31.221946.22162@netcom.com> kasajian@netcom.com (Kenneth Kasajian) writes:

 >How do I copy all the files in the current directory into a subdirectory
 >name 'sub'.  I do :
 >cp * sub/
 >but then it tries to copy all the subdirectories as well.  I've tried
 >doing :
 >cp `find . -type f -print` sub/
 >but find finds all files below the current, not just the current directory.
 >I guess I can use ls, but how do I get ls to only display the files only
 >and not directories?

Try foreach.

example:
csh% foreach f ( * )
? if ( -f $f ) mv $f sub
? end
From: kevinl@tisdec.tis.tandy.com
Newsgroups: comp.unix.shell
Subject: Re: How to do csh-like alias in ksh?
Date: 28 Dec 92 14:45:00 GMT
Nf-ID: #R:microsoft.com:8880:tisdec.tis.tandy.com:28300010:000:304
Nf-From: tisdec.tis.tandy.com!kevinl    Dec 28 08:45:00 1992


	You need to use a ksh function.  Something like this:

function ff {
	find . -name $1 -print
}

	It works just like an alias, but has shell script syntax.

Hope this helps.
--
Kevin K. Lewis             | My opinions may be unreasonable
kevinl@tisdec.tis.tandy.com| but such is the voice of inspiration
Newsgroups: comp.unix.shell
From: vsarkela@convex.csc.FI (Vesa S{rkel{)
Subject: Re: stripping cr/lf's
Organization: Finnish Academic and Research Network Project - FUNET
Date: Thu, 31 Dec 92 17:39:40 GMT

In <1992Dec31.165409.23109@mnemosyne.cs.du.edu> jefouger@nyx.cs.du.edu (Jim  Fougeron) writes:

>kasajian@netcom.com (Kenneth Kasajian) writes:


>>How do I strip the cr's from a text file?  There must be a standard
>>unix way of doing it!
>>thanks

>I perform this task with a utility from Omen (rz/sz people) called undos.
>This program will convert files from dos-unix-mac-cpm.
>If you wanted to do this ONLY using standard Unix commands, one way is:
>tr -d '/15' < infile > outfile

this should be tr -d '\15' <infile >outfile 
or tr -d 13 <infile >outfile
(carriage retun = 13 decimal = 15 octal = 0D hexadecimal)

>NOTE: Do not do this on anything other than PLAIN text, or you will end up
>      with  a corrupted output file.
>Hope this helps.

you are welcome

>--
>---------------------------------------------------------------------------
>|  Jim Fougeron                |  What is the true meaning of happiness?  |
>|  jefouger@nyx.cs.du.edu      |   Is it money, cars and women, ... or    |
>|  jimfn@ids.net               |   just money and cars?  Calvin & Hobbes  |

Vesa Sarkela                       Keskuslaboratorio Oy
vsarkela@convex.csc.fi   Finnish Pulp & Paper Research Institute
Newsgroups: comp.unix.shell
From: RAHLFS@BEATE.RZ.FH-ULM.DE (RZ D. Rahlfs)
Subject: VI command reference
Organization: FACHHOCHSCHULE ULM (GERMANY)
Date: Wed, 30 Dec 1992 13:15:43 GMT
X-News-Reader: VMS NEWS 1.22

Who knows from where I can get the VI command reference of Marten
Litmaath et al?
Newsgroups: comp.unix.shell
From: mikepb@lupus.dell.com (Michael P. Brininstool)
Subject: Re: wanted: tutorial about sh programming
Reply-To: mikepb@lupus.dell.com
Organization: Dell UNIX Support
Date: Mon, 28 Dec 1992 22:41:49 GMT

In article <1992Dec23.191853.24899@nosc.mil>, mcdono@nosc.mil (Tim McDonough CSC Room 191 Phone 553 3102 ) writes:
|> 
|> I'd like the following line to produce the output below it.
|> 
|> echo "Hostname is " $system "   Host id is " $hostid
|> 
|> Hostname is foo     Host id is 78454
|> Hostname is fooobar Host id is 89000
|> 
|> I tried removing the quotes to no avail, any ideas?

Try something like this:

echo "$system $hostid" | \
awk '{printf("Hostname is %-8s Host id is %5s\n",$1,$2)}'

----------------------------------------------------------------------------|
| Michael P. Brininstool   DELL UNIX PRODUCT SUPPORT  mikepb@lupus.dell.com |
|----------------------------------------------------------------------------
From: andrew@rentec.com (Andrew Mullhaupt)
Newsgroups: comp.unix.dos-under-unix
Subject: Re: Windows NT
Date: 31 Dec 92 20:28:53 GMT
Organization: Renaissance Technologies Corp., Setauket, NY.

In article <C03I3E.10C@world.std.com> apl@world.std.com (Anthony P Lawrence) writes:
>  It's obvious from even what I've read so far that NT is
[... enough to make any 'Unixoid' happy]


I'm interested in this idea. In order for me to be happy the OS must
provide advanced virtual memory (essentially equivalent to mmap in SysVR4)
or else it's dreck. Also, I don't cross the street unless the capability
of dynamic loading (which is more useful than dynamic linking) is explicitly
supported. I'm getting pretty cramped in the 32 bit address space, so will
Windows NT make me happy?

I.e. Does Windows NT support dynamic loading, memory mapped files and
will there be a 48/64 bit version before 1996?

Later,
Andrew Mullhaupt
Newsgroups: comp.unix.dos-under-unix
From: apl@world.std.com (Anthony P Lawrence)
Subject: Re: Windows NT
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: Tin 1.1 PL3
Date: Wed, 30 Dec 1992 23:18:50 GMT

rstory@elegant.com (Robert Story) writes:
: 
: My understanding (which is very little, indeed) is only from press
: reports.  However, I thought that NT was only a single user system and
: as such would only make use of the console.  Ergo, why would one
: require support for dumb terminals ???

Well, no, it's not single user.   NT seems (from my reading) to
be quite capable of supporting remote logons.

Why dumb terminals?  Well, for example, I have a client presently
running Xenix with 40 dumb terminals, 6 or 7 Dos machines running
Windows but logging into the Xenix box through terminal emulation, and 
about a dozen serial printers.

There is no way that they would even consider NT because they aren't 
going to run out and buy 40 dos boxes, 46 network cards and rewire the
whole building for Ethernet.

But, if NT did support dumb terminals, they could consider it.  Then,
gradually, they could add NT machines to the network, and ultimately
end up where Microsoft wants them to be :-).

If anyone from Microsoft is listening, this is where you are missing
the boat.  It's obvious from even what I've read so far that NT is
an environment that any Unixoid would be happy in - except for your
blind insistance that GUI and networks are the only way to go.

I'm just a little guy.  But I have clients similar to the one mentioned
above that total out to thousands of dumb terminals that aren't going
to be thrown out.  There are a lot more people who have never heard
of me :-) so it looks like Microsoft is ignoring a lot of potential
desktops.  Is it greed?  Do they think that forcing this interface
will sell more product?  Or are they just plain blind?  Somehow it's
hard for me to believe that Microsoft is that dumb...

		Tony   apl@world.std.com

Lawrence & Clark, Inc		(617) 762-0707	(206) 323-2864
Xenix/Unix support,etc 	 	 Boston		 Seattle
       Kevin Clark is embarrassed by most of what I say.



Newsgroups: comp.unix.dos-under-unix
From: apl@world.std.com (Anthony P Lawrence)
Subject: Re: Windows NT
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: Tin 1.1 PL3
Date: Fri, 1 Jan 1993 00:13:28 GMT

andrew@rentec.com (Andrew Mullhaupt) writes:
: In article <C03I3E.10C@world.std.com> apl@world.std.com (Anthony P Lawrence) writes:
: >  It's obvious from even what I've read so far that NT is
: [... enough to make any 'Unixoid' happy]
: 
: 
: I'm interested in this idea. In order for me to be happy the OS must
: provide advanced virtual memory (essentially equivalent to mmap in SysVR4)
: or else it's dreck. Also, I don't cross the street unless the capability
: of dynamic loading (which is more useful than dynamic linking) is explicitly
: supported. I'm getting pretty cramped in the 32 bit address space, so will
: Windows NT make me happy?
: 
: I.e. Does Windows NT support dynamic loading, memory mapped files and
: will there be a 48/64 bit version before 1996?

Someone who knows more than I should answer this, but if they don't:

From what I've read so far: mmap (yes) virtual memory (yes).  Beyond
t, I dunno.  It is multiprocessor, though and is *not* [3-5]86 specific.

They don't call it mmap(), of course. It's called a "file mapping
object, [which] represents a block of memory".  Kind of obvious
what it is, isn't it?

Reading "Inside Windows NT" is fun. Ideas that are old hat to Unix
are presented as though they were wonderful insights by the Microsoft
design team.  Not knocking the book, it's pretty good.  It's just that
I keep saying "Well, geez, why don't they just call it NT-Unix and
be done with it?"

		Tony   apl@world.std.com

Lawrence & Clark, Inc		(617) 762-0707	(206) 323-2864
Xenix/Unix support,etc 	 	 Boston		 Seattle
       Kevin Clark is embarrassed by most of what I say.
Newsgroups: comp.unix.dos-under-unix
From: bill@Celestial.COM (Bill Campbell)
Subject: Re: Windows NT
Organization: Celestial Software, Mercer Island, WA
Date: Mon, 04 Jan 1993 01:38:38 GMT

In <1993Jan03.203640.24282@Celestial.COM> ray@Celestial.COM (Ray Jones) writes:

:A Micorsoft "evangalist" (sp?) that gave a talk at one of our meeting
:(Unix user group) stated that NT would be marketed first in the server
:market, but was indeed capable of multi-user.  That feature would be
:marketed 9 months to a year after introduction.  But, what the hell, its
:just a rewrite of UNIX so they won't have to pay UNIX royalties, so why
:shouldn't it be multi-user.

I wonder....  Microsoft had (has) a UNIX source license when they
originally developed Xenix.  Could this open them up to trade
secret violations suits similar to the USL v BSDI case?

Why would anyone want to use an OS that would make them dependent
on such a benevolent company as Microsoft?

Bill
-- 
INTERNET:  bill@Celestial.COM   Bill Campbell; Celestial Software
UUCP:   ...!thebes!camco!bill   6641 East Mercer Way
             uunet!camco!bill   Mercer Island, WA 98040; (206) 947-5591
SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
From: apl@world.std.com (Anthony P Lawrence)
Newsgroups: comp.unix.dos-under-unix
Subject: Windows NT
Date: 29 Dec 92 17:01:02 GMT
Organization: The World Public Access UNIX, Brookline, MA
X-Newsreader: Tin 1.1 PL3

I just bought "Inside Windows NT" by Helen Custer (Microsoft Press)
and have started reading it but immediately I have a dozen questions
that (maybe) someone can answer.

My biggest objection to NT has been the lack of support for dumb
terminals, and the absence of a command line driven shell.  I imagine
the second is trivially easy, and I thought the first would be too, but
now I'm starting to wonder.

According to my understanding of what little I've read so far :-)
the logon process in NT is rather strongly linked to the Win32 Subsystem,
and the Win32 Subsystem is what provides and controls the screen, the 
keyboard, etc.  In other words, you get to any other subsystem through
Win32, and that system has to use Win32 for it's user-interface I/O.

If I have understood that correctly (odds, anyone?), it seems that tacking
on terminal support would be more than a little difficult???  Or could it
be done in the context of something that starts up in Win32, spawns off
terminal logins (but this assumes that the logon can be persuaded not
to call Win32)?  I'm getting confused...

On the other hand, it would seem that porting Unix apps to this environment
and running in something similar to an xterm window might be very easy.

And, of course, what this ulimately comes down to is where to place my
bets for the next few years.  If there is a way to make NT support dumb
terminals and present a "Unix" interface for those of us who love it,
and if porting apps really is going to be as easy as it looks, then I 
think NT is going to win... 

Somebody talk me out of this, please!


		Tony   apl@world.std.com

Lawrence & Clark, Inc		(617) 762-0707	(206) 323-2864
Xenix/Unix support,etc 	 	 Boston		 Seattle
       Kevin Clark is embarrassed by most of what I say.
Newsgroups: comp.unix.dos-under-unix
From: bill@Celestial.COM (Bill Campbell)
Subject: Re: Windows NT
Organization: Celestial Software, Mercer Island, WA
Date: Sat, 02 Jan 1993 19:28:38 GMT

In <C05822.HDy@world.std.com> apl@world.std.com (Anthony P Lawrence) writes:

:mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
:: 
:: NT supports multiple users, but the software required to log them in
:: isn't part of NT (so they currently must either be at the console or
:: submit remote-style jobs).  In other words, NT out of the box is a
:: single-user-at-a-time multi-user-distributed-processing multi-tasking
:: OS.  If you don't believe that, ask Microsoft.  The contention is that
:: third parties will provide the login programs required to allow remote
:: machines running Windows to log in over a network.

What if I don't want to run a window system that looks like it
was painted with a crayon?

:So... any reason that a third party couldn't write a logon program
:that was intended to display on a dumb terminal?  Or is the GUI stuff
:too interwound with everything??  

Sounds like NT will be just like DOS -- A minimal system that
requires the user/integrator to go out an buy a bunch of 3rd
party software to make it useful.

Bill
-- 
INTERNET:  bill@Celestial.COM   Bill Campbell; Celestial Software
UUCP:   ...!thebes!camco!bill   6641 East Mercer Way
             uunet!camco!bill   Mercer Island, WA 98040; (206) 947-5591
SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
Newsgroups: comp.unix.dos-under-unix
From: vsp@peewee.enet.dec.com (Vipul Patel)
Subject: Re: msdos emulator for decstaton 3100
Reply-To: vsp@peewee.enet.dec.com (Vipul Patel)
Organization: Digital Equipment Corporation
Distribution: usa
Date: Wed, 23 Dec 1992 15:36:18 GMT




	DEC sells and supports an MS-DOS emulator
	that would work on top of its Ultrix and
	VMS operating systems. DEC SoftPC emulates
	a 286 PC. It would allow you to run Lotus 1-2-3,
	WordPerfect, Harvard Graphics, Quattro Pro,
	MS Word and Windows etc.

	If the application requires special h/w or
	a protected mode memory, it may not function
	as they function os an IBM PC AT.

	Hope this helps,


	Vipul Patel
Newsgroups: comp.unix.dos-under-unix