Mail Delivery Problem

SMTP MAILER postmaster at sandia.gov
Tue Aug 21 23:01:40 AEST 1990


 ----Reason for mail failure follows----
Sending mail to <jnjortn at ceratiidae.cs.sandia.gov> :
  Could not be delivered for three days.

 ----Transcript of message follows----
Date: 18 Aug 90 05:45:00 MDT
From: info-unix at BRL.MIL
Subject: INFO-UNIX Digest  V10#120
To: "jnjortn" <jnjortn at ceratiidae.cs.sandia.gov>

Return-Path: <incoming-info-unix-request at sandia.gov>
Received: from SEM.BRL.MIL by sandia.gov with SMTP ; 
          Sat, 18 Aug 90 05:30:16 MDT
Received: from SEM.BRL.MIL by SEM.BRL.MIL id ab15042; 18 Aug 90 5:56 EDT
Received: from sem.brl.mil by SEM.BRL.MIL id aa15035; 18 Aug 90 5:46 EDT
Date:       Sat, 18 Aug 90 05:45:38 EST
From:       The Moderator (Mike Muuss) <Info-Unix-Request at BRL.MIL>
To:         INFO-UNIX at BRL.MIL
Reply-To:   INFO-UNIX at BRL.MIL
Subject:    INFO-UNIX Digest  V10#120
Message-ID:  <9008180546.aa15035 at SEM.BRL.MIL>

INFO-UNIX Digest          Sat, 18 Aug 1990              V10#120

Today's Topics:
                         Re: -F option for awk
                          Re: Working with sed
                  Re: How to tell if a process exists
                          Re: the f2c program
                       Re: nutshell book on uucp
                         nutshell book on uucp
                            8mm Reliability
            Re: What's wrong with this Bourne shell script?
               Re: recursive variable substitution in csh
                        Re: directory "indexer"
                      Re: OK, so who runs SVR4 ??
                   Onyx C8002; anyone else have one?
                          no ETXTBUSY in SVr4?
                              Re: /-happy
                Re: get terminal speed from shell script
                              rm delayed?
                            Re: rm delayed?
       AT&T 3B2 computer info wanted before 8/20/90 ::::::::))))
              Re: Changing back slashes to forward slashes
              Re: Converting to uppercase/lowercase in sed
                European X windows User Group Conference
         forecasting, measuring, simulation and modeling tools.
                   Re: Printing with terminalservers
                 Wanted: ftp sites for c-shell programs
        Re: Cshell question: taking wordlists as a single string
                               herror(3)
Opening for output on a terminal server (was Printing with terminalservers)
            Nutshell Handbook on sendmail doesn't exist yet
                    Re: sort with a tab as separator
                   Adding on to the history mechanism
            How do I change the number of lines on my term?
                       UNIX System V.3 benchmarks
             Automatic notification of file system changes
            Re: getting the exit value of an exec'd program
      Running "The Complete Answering Machine" under DOS emulation
                           C-shell variables
               /dev/ptmx, granpt(), ptsname() etc .. HELP
-----------------------------------------------------------------

From: Jim Rogers <jimr at hp-lsd.cos.hp.com>
Subject: Re: -F option for awk
Date: 14 Aug 90 18:48:06 GMT
To:       info-unix at sem.brl.mil

The answer is to set up the output field separator to be a colon also.

For instance:

	awk -F":" 'OFS = ":" { print $1, $2 }' /etc/passwd

will print out the first two fields of the password file with the output
fields separated by colons.

Jim Rogers
Hewlett Packard Company

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

From: Jeff Beadles <jeff at onion.pdx.com>
Subject: Re: Working with sed
Date: 15 Aug 90 23:09:44 GMT
To:       info-unix at sem.brl.mil

nr3m at unix.cis.pitt.edu (Matthew A Henry) writes:

|>I'm writing a script that uses sed, and am having trouble with one
|>part.  I have a file that contains typical unix paths, one per
|>line, and would like to remove everything after the last forward 
|>slash (/).  In other words I would like the string:
|>	/aaa/bbb/ccc/ddd/eee
|>to be changed to:
|>	/aaa/bbb/ccc/ddd

Of course it is.  (You can do 'most anything with sed :-)

Run the file thru this:

sed 's:/[^/][^/]*$::' < file1 > file2


Have fun!
	-Jeff
-- 
Jeff Beadles	jeff at onion.pdx.com

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

From: Jeff Beadles <jeff at onion.pdx.com>
Subject: Re: How to tell if a process exists
Date: 15 Aug 90 23:15:37 GMT
To:       info-unix at sem.brl.mil

samlb at pioneer.arc.nasa.gov.UUCP (Sam Bassett RCS) writes:
>boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
>>Wrong.  RTFM --  kill(pid, 0)

>	Hmmm -- must be running Reverse Polish Unix down under, 'cause my
>manual sez: " kill [-sig] processid... ", and I've been doing it that way
>for a looooooooong time.

>	What kind of UNIX _are_ you running??

Well, most any modern variant.  The kill(pid,0) version is for the 'C'
programming language.  See the kill(2) man page.

kill -SIG pid is a simple C program that's called by the shell.


	-Jeff
-- 
Jeff Beadles    jeff at onion.pdx.com

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

From: rick at tmiuv0.uucp
Subject: Re: the f2c program
Date: 16 Aug 90 13:19:42 GMT
To:       info-unix at sem.brl.mil

In article <1990Aug11.202542.9891 at ux1.cso.uiuc.edu>, mcdonald at aries.scs.uiuc.edu (Doug McDonald) writes:
> On the computer research.att.com is a program called "f2c". It converts
> Fortran programs to, mostly, C. But it does NOT convert Fortran IO
> calls to C. Instead it just invokes some mysterious io routines. I
> take these to be somebody's Fortran IO runtime library - indeed, there
> are linking with certain libraries. But WHOSE libraries?

The mysterious routines are libf77 and libi77, available from the same
source.  I quote from the index for f2c:

    libf77  Library of non I/O support routines the generated C may need.
            Fortran main programs result in a C function named MAIN__ that
            is meant to be invoked by the main() in libf77.

    libi77  Library of Fortran I/O routines the generated C may need.
            Note that some vendors (e.g., BSC, Sun, and MIPS) provide a
            libF77 and libI77 that are incompatible with f2c -- they
            provide some differently named routines or routines with the
            names f2c expects, but with different calling sequences.
            On such systems, the recommended procedure is to merge
            libf77 and libi77 into a single library, say libf2c and
            install it where you can access it by specifying -lf2c.

The libraries and source are available from the same source as f2c.

> Doug McDonald(mcdonald at aries.scs.uiuc.edu)
-- 
 ----------------------------------------------------------------------------
[- O] Rick Stevens
  ?   EMail: uunet!zardoz!tmiuv0!rick -or- uunet!zardoz!xyclone!sysop
  V   CIS: 75006,1355 (75006.1355 at compuserve.com from Internet)

"Reality is a crutch for people who can't handle science fiction."
 ----------------------------------------------------------------------------

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

From: rick at tmiuv0.uucp
Subject: Re: nutshell book on uucp
Date: 16 Aug 90 13:27:10 GMT
To:       info-unix at sem.brl.mil

In article <9008091533.AA00951 at lilly2.lab.fj.bapd>, tr at lilly2.lab.fj.bapd writes:
> I once saw a book on uucp communications.  It had the word "nutshell"
> in the title, and I think it had a picture of an acorn on the cover.
> Does anyone know where I can get this book or something else that
> describes how to configure uucp on unix?

There are really two Nutshell handbooks on UUCP.  One is called "Managing
UUCP and Netnews", the other is "Using UUCP and Netnews".  Both are entries
in O'Reilly and Associates' series of Nutshell handbooks which cover a
wide range of Unix-related subjects including X-Windows, Unix in general,
and much more.  I don't have the address of O'Reilly handy, unfortunately,
but I'll post a followup regarding their address.

> Thanks.
> 
> Tom Reingold

You're welcome! 8-)

 ----------------------------------------------------------------------------
[- O] Rick Stevens
  ?   EMail: uunet!zardoz!tmiuv0!rick -or- uunet!zardoz!xyclone!sysop
  V   CIS: 75006,1355 (75006.1355 at compuserve.com from Internet)

"Reality is a crutch for people who can't handle science fiction."
 ----------------------------------------------------------------------------

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

From: Jean Marie Diaz <ambar at ora.com>
Subject: Re: nutshell book on uucp
Date: 17 Aug 90 15:53:13 GMT
Sender: news at ora.com
To:       info-unix at sem.brl.mil


   From: rick at tmiuv0.uucp
   Date: 16 Aug 90 13:27:10 GMT

   There are really two Nutshell handbooks on UUCP.  One is called "Managing
   UUCP and Netnews", the other is "Using UUCP and Netnews".  Both are entries
   in O'Reilly and Associates' series of Nutshell handbooks which cover a
   wide range of Unix-related subjects including X-Windows, Unix in general,
   and much more.  I don't have the address of O'Reilly handy, unfortunately,
   but I'll post a followup regarding their address.

See my .sig for current addresses and phone numbers.

				AMBAR
ambar at ora.com						uunet!ora!ambar
O'Reilly & Associates, Inc.  Publishers of Nutshell Handbooks
90 Sherman Street, Cambridge, MA 02140; 617-354-5800
Book Orders => 632 Petaluma Ave, Sebastopol, CA 95472 
               800-338-NUTS (in CA 800-533-NUTS) FAX 707-829-0104

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

From: tr at lilly2.lab.fj.bapd
Subject: nutshell book on uucp
Date: 17 Aug 90 19:25:01 GMT
Sender: daemon at ucbvax.berkeley.edu
To:       info-unix at sem.brl.mil

I just noticed that /bin/mail will send mail with a bogus return
address if you want it to.  Just set the LOGNAME variable to whatever
you want.

Is this a glaring bug that everyone knows about?  Or is it something we
have to put up with for some reason.

Tom Reingold
AT&T                             att!journey!treingold
Juniper Plaza, Route 9           treingold at journey.att.com
Room 1A-133                      (201) 577-5814 [work]
Freehold, NJ 07728-3298          (201) 287-2345 [home]

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

From: Calvin Hayden x2254 <cgh018 at tijc02.uucp>
Subject: 8mm Reliability
Date: 16 Aug 90 16:16:52 GMT
To:       info-unix at sem.brl.mil

General question... this may have been brought up in some earlier
postings, but its been a while since I've looked at `em daily.

Any statistics on how reliable 8mm cartridge tapes are when used
for archival purposes (say stored without use for 3+ years)?

How do they compare to 1/2" 9 track, or 1/4" QIC for a purpose 
such as this.  

Reason I ask is this:  we are moving off a vax with a 9 track drive
onto a network of suns with 8mm and 1/4".  We have quite a few 
tapes archived on 9 track, which I am in the process of moving over
to a media I have avaliable on the Suns.  There are no plans for 
a 9 track drive on the suns.

In summary:  How does 8mm tape storage compare with 1/4" QIC or
1/2" 9 track in the area of extended storage?  Is one any better
than the other for this purpose?  If so, which?  A 9 track may be
purchased if its tapes are more reliable as archive media.

Email preffered, followups accepted...  Thanks in advance!


-- 
Calvin Hayden
Texas Instruments, Johnson City, Tn.    
Voice (615)461-2254
UUCP:  ...mcnc!rti!{olympus,tijc02}!{root,cgh018}

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

From: Tom Christiansen <tchrist at convex.com>
Subject: Re: What's wrong with this Bourne shell script?
Date: 16 Aug 90 16:26:34 GMT
Sender: news at convex.com
To:       info-unix at sem.brl.mil

In article <FPB.90Aug16005419 at ittc.ittc.wec.com> fbresz at ittc.wec.com writes:
[chiding of Randal deleted]
>	That would be fine if I had or wanted pearl.  I was under the
>impression that Jon's addcol was an awk script (I think that's where the
>original thread came from anway) in which the -# was the column you wanted
>to add and it would magically add up the numbers in column 1 or 7 or
>whatever column you wanted under argumentalized control instead of having
>separate scripts for each possible set of columns you want to add.

You mean perl, but anyway....

    usage: addcol field_number

as in 'ls -l | addcol 5'

    #!/bin/sh
    field=$1
    shift
    awk "{sum += \$$field;}END {print sum}" $*

If you want to bullet-prove it against bad args, you can 
do more checking

--tom
--
Tom Christiansen                       {uunet,uiucdcs,sun}!convex!tchrist 
Convex Computer Corporation                            tchrist at convex.COM
  "UNIX was never designed to keep people from doing stupid things,
   because that policy would also keep them from doing clever things." [gwyn]

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

From: Tom Christiansen <tchrist at convex.com>
Subject: Re: recursive variable substitution in csh
Date: 16 Aug 90 18:38:24 GMT
Sender: news at convex.com
To:       info-unix at sem.brl.mil

In article <9045 at cg-atla.agfa.com> jmacdon at cg-atla.UUCP (Jeff MacDonald) writes:
>In the C-shell, how does one evaluate a variable which contains the
>name of a variable in order to get the value of the variable
>contained by the variable that one is evaluating?
>
>set x = 'ABC'
>set y = '$x'
>set z =      # some function of y such that $z == "ABC"

% eval set z = "$y"
% echo $z
% ABC

--tom
--
Tom Christiansen                       {uunet,uiucdcs,sun}!convex!tchrist 
Convex Computer Corporation                            tchrist at convex.COM
  "UNIX was never designed to keep people from doing stupid things,
   because that policy would also keep them from doing clever things." [gwyn]

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

From: Fred Stluka <stluka at software.org>
Subject: Re: directory "indexer"
Keywords: search,directory,index
Date: 16 Aug 90 21:02:49 GMT
Sender: news at software.org
To:       info-unix at sem.brl.mil

In article <335 at nih-csl.nih.gov> tpersky at alw.nih.gov (Ted Persky) writes:
> The people in our lab always seem to be asking each other
> to help them locate the path name for "foo.c".
> ...
> What I'm wondering is whether anyone knows of a tool where
> one can define a directory as being the root of a "large file
> tree" and have an index of some sort placed at that root.  After
> that is created, each person who creates a file in that particular
> sub-tree would type in some sort of librarian command to create
> an entry in the index with a brief description of the file.
> Then the index (in database form, preferably) could be queried
> to locate the path name for a desired file.  This would be ideal
> if people such as MIT could create this for their distributions
> of X, or UNIX vendors for their source distributions.

Can't help you with the solution you recommend (an indexer),
but if you are open to other solutions...

Teach the "people in the lab" about the "find" command.
You can even make it more convenient for them, by defining
an alias:

	alias dirr 'find . -name \!* -print | sort'

which allows them to cd to the root of the tree where the 
file is known to reside and type:

	dirr foo.c

Encourage them to use it on the smallest tree they know
to contain the file because the search is slow.

--Fred

Fred Stluka                          Internet: stluka at software.org
Software Productivity Consortium     UUNET:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070  

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

From: "Mark J. Bailey" <root at mjbtn.jobsoft.com>
Subject: Re: OK, so who runs SVR4 ??
Keywords: V4
Date: 17 Aug 90 00:47:09 GMT
To:       info-unix at sem.brl.mil

In <325 at uport.UUCP> rduc at uport.UUCP (Rchard Ducoty) writes:

>In article <1990Aug6.121634.176 at aim1.uucp> deon at aim1.uucp (Deon Botha) writes:
>>From article <736 at pcsbst.pcs.com>, by mike at cochise.pcs.com (Mike Schroeder):
>>> 
>>> the subject line really says all: what system vendors/software vendors
>>> are supplying SVR4 for _real live_ systems today?

>>> If any: who for what system?
>==============

>Microport is also shipping V4 for 386/486 machines  (ISA)

>Richard Ducoty
>Microport
>Scotts Valley, CA
>408 438-8649

I have heard a rumor that supposedly (from the electronic grape vine) SCO
will ship *SV4.1* (skipping SV4.0) sometime in the first half of next year!
I can neither confirm nor shoot that down.  When I later mentioned it to 
an SCO rep, they did not know what I was talking about....hmmmm....  So, 
as I said, a rumor, for what it is worth.

On a related matter, I did lose a client on account of the fact that 
openly SCO had not announced a SV4.? release.  He did not want SV3.2.x.

Does anyone know anything regarding SCO and V4?  BTW, I am, of course, 
referring to V4 for 386 and/or 486.

Mark.

-- 
Mark J. Bailey, N4XHX                   "We do our JOB, so you can do yours!"
USMAIL: 511 Memorial Blvd., Murfreesboro, TN 37129_______/====X11====\_______
VOICE:  +1 615 893 0098                           |         JobSoft         |
UUCP:   ...!uunet!mjbtn!mjb, ...!raider!mjbtn!mjb | Design & Development Co.|
DOMAIN: mjb at mjbtn.JOBSOFT.COM      CIS: 76314,160 |  Murfreesboro, TN  USA  |
<KA9Q-UNIX-USERS Mailing List-Subscribe: ka9q-unix-requests at mjbtn.jobsoft.com>

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

From: Jim Earl <jre at sactoh0.sac.ca.us>
Subject: Onyx C8002; anyone else have one?
Keywords: Need help getting uucp going on this machine
Date: 17 Aug 90 01:02:32 GMT
To:       info-unix at sem.brl.mil

I just bought an Onyx C8002 computer.  This beast is about
10 years old, and runs Unix System III, version 3.0.4.
Just about everything works, except for uucp.
cu works fine.  But trying uucico to call a system
keeps giving me a "NO DEVICE" error, when run with the
-x9 debugging parameter.
I'm pretty sure I've got my L-devices and L.sys set up
correctly (according to a couple of friends who are
familiar with system III).
The main thing I don't understand is, how can cu work,
but not uucico?  They both "talk to" the same device.

If you have have one of these machines, I'd really
like to hear from you.

I'd be glad to hear from you even if you don't have
one of these machines, but can offer some assistance.

-- 
Jim Earl - KB6KCP / home: (916) 729-6825 work: (916) 929-0300 x233
INTERNET: pacbell!sactoh0!jre at ames.arc.nasa.gov
UUCP: {ames | apple | att | sun}!pacbell!sactoh0!jre
  or: ucbvax!csusac!sactoh0!jre

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

From: Romain Kang <romain at pyramid.pyramid.com>
Subject: no ETXTBUSY in SVr4?
Date: 17 Aug 90 01:51:44 GMT
To:       info-unix at sem.brl.mil

$ a.out &
[1] 577
$ cp /dev/null a.out
[1]  + Killed           a.out

Why?

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

From: Tom Christiansen <tchrist at convex.com>
Subject: Re: /-happy
Date: 17 Aug 90 02:07:05 GMT
Sender: news at convex.com
To:       info-unix at sem.brl.mil

In article <1990Aug16.215045.21300 at iwarp.intel.com> merlyn at iwarp.intel.com (Randal Schwartz) writes:
>| Explain why '/////' is valid in the following statement:
>| cd /./../tmp/////../././bin
>
>The null pathname (look carefully between the consecutive "/"-s, and
>you'll see them there) is a valid synonym for the "current directory".

Well, only until POSIX, after which a null pathname "" is considered an
error and NOT to be a valid synonym for ".".  However, this case continues
to work because adjacent /'s are to be collapsed in the kernel's path-to-
inode routine (possibly lookuppn() or namei() depending on UNIX flavor).

--tom
--
  "UNIX was never designed to keep people from doing stupid things, because 
   that policy would also keep them from doing clever things." [Doug Gwyn]

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

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: /-happy
Date: 17 Aug 90 18:57:18 GMT
To:       info-unix at sem.brl.mil

In article <3139 at dftsrv.gsfc.nasa.gov> merritt at iris613.gsfc.nasa.gov (John H Merritt) writes:
>Explain why '/////' is valid in the following statement:
>cd /./../tmp/////../././bin
>It is interesting that any permutation of '.', '..', '/' and directory
>names can be used with, at least, csh, sh, and tcsh to yield a valid
>path name.

You're overgeneralizing.
Shells, which must necessarily implement "cd" as a built-in instead of
invoking a subprocess to do the chdir, sometimes are implemented to keep
track internally of the current working directory, especially if they
offer a shell variable that expands to the CWD string.  As a side-effect
of an internal canonicalization of the CWD string, such shells may
themselves try to remove . .. and null pathname components.  It is not
true that the kernel would necessarily accept such a noncanonicalized
string as a valid argument to the chdir() system call.
All the pathname canonicalization algorithms I've encountered so far
have had some undesirable features, such as you mention.  I've been
working on an improved algorithm, but it's not available yet.  Note that
there is no way to handle "whatever/foo/.." where "foo" does not exist
or is not a directory, without consulting the kernel about it, which is
contrary to the whole notion of using pathname canonicalization.

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

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: /-happy
Date: 17 Aug 90 18:58:29 GMT
To:       info-unix at sem.brl.mil

In article <1990Aug16.215045.21300 at iwarp.intel.com> merlyn at iwarp.intel.com (Randal Schwartz) writes:
>The null pathname (look carefully between the consecutive "/"-s, and
>you'll see them there) is a valid synonym for the "current directory".

No, it isn't, at least for modern UNIX implementations.

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

From: Gerry Roderick Singleton  <gerry at jts.com>
Subject: Re: get terminal speed from shell script
Date: 17 Aug 90 03:44:01 GMT
To:       info-unix at sem.brl.mil

In article <12584 at hydra.gatech.EDU> gt0178a at prism.gatech.EDU (BURNS,JIM) writes:
>in article <1990Aug14.181010.29571 at jts.com>, gerry at jts.com (Gerry Roderick Singleton ) says:
>> #! /bin/sh
>> 
>> speed=`stty speed </dev/tty 2>&1`
>> echo $speed
>
>Nope, on SunOS 4.0, you get:
>
>{richsun12:/usr}
>[196] t=`stty speed </dev/tty 2>&1`
>{richsun12:/usr}
>[197] echo $t
>stty: Operation not supported on socket
>{richsun12:/usr}
>[198]
>-- 

Hmm, that's true when you're in a window.  I did not interpret the
original question as being window specific but the more general
case of working with ttys and pttys.  The script DOES work for real
ttys and ti even works on pttys over RPC links.  Here's the output
under these circumstances as executed with /bin/sh -vx foo, where foo
is the four lines above:

#! /bin/sh

speed=`stty speed </dev/tty 2>&1`
+ stty speed 
speed=9600
echo $speed
+ echo 9600 
9600

I have no window system solution, so I hope one of the window system
gurus can help.

ger
-- 
--
G. Roderick Singleton, System and Network Administrator, JTS Computers 
	{uunet | geac | torsqnt}!gerry at jtsv16.jts.com

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

From: "BURNS,JIM" <gt0178a at prism.gatech.edu>
Subject: Re: get terminal speed from shell script
Date: 17 Aug 90 09:22:45 GMT
To:       info-unix at sem.brl.mil

in article <1990Aug17.034401.12720 at jts.com>, gerry at jts.com (Gerry Roderick Singleton ) says:
> Hmm, that's true when you're in a window.  I did not interpret the
> original question as being window specific but the more general
> case of working with ttys and pttys.  The script DOES work for real

I was on a 'screen' window on one host, doing an rlogin to the SUN. I was
not in a window as far as the Sun was concerned, although rlogin was
probably using a socket. This saved me the trouble of being physically at
the Sun. Are you saying this is stll justified behavior for the Sun? Rlogin-
ing to a Mac A/UX, or even back to my host, does not cause problems w/stty.

> ttys and ti even works on pttys over RPC links.  Here's the output
> under these circumstances as executed with /bin/sh -vx foo, where foo
> is the four lines above:

> #! /bin/sh

> speed=`stty speed </dev/tty 2>&1`
> + stty speed 
> speed=9600
> echo $speed
> + echo 9600 
> 9600

> I have no window system solution, so I hope one of the window system
> gurus can help.

The previously posted solutions of

speed=`stty speed 3>&1 1>&2 2>&3`

or

speed=`/usr/5bin/stty speed`

work.
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu

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

From: Brian Glendenning <bglenden at mandrill.cv.nrao.edu>
Subject: rm delayed?
Date: 17 Aug 90 05:33:35 GMT
Sender: news at murdoch.acc.virginia.edu
To:       info-unix at sem.brl.mil


Is it ever possible for a shell script snippet like the following:

touch /tmp/bad.$$
[...]
# Success
rm /tmp/bad.$$
[...]
if [ -f /tmp/bad.$$]
then
	echo failed
	exit 1
fi

To falsely report failure? This seems to be happening on our system
(convex). Is it true that if the rm succeeds it does so immediately,
or is it possible that some sort of race can be causing a false
apparent failure? I wouldn't have thought so, but I can't quite see
where else the script might be going wrong. Thanks!
--
       Brian Glendenning - National Radio Astronomy Observatory
bglenden at nrao.edu          bglenden at nrao.bitnet          (804) 296-0286

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

From: Tom Christiansen <tchrist at convex.com>
Subject: Re: rm delayed?
Date: 17 Aug 90 11:44:05 GMT
Sender: news at convex.com
To:       info-unix at sem.brl.mil

In article <BGLENDEN.90Aug17013335 at mandrill.cv.nrao.edu> bglenden at mandrill.cv.nrao.edu (Brian Glendenning) writes:
>
>Is it ever possible for a shell script snippet like the following:
>
>touch /tmp/bad.$$
>[...]
># Success
>rm /tmp/bad.$$
>[...]
>if [ -f /tmp/bad.$$]
>then
>	echo failed
>	exit 1
>fi
>
>To falsely report failure? This seems to be happening on our system
>(convex). Is it true that if the rm succeeds it does so immediately,
>or is it possible that some sort of race can be causing a false
>apparent failure? I wouldn't have thought so, but I can't quite see
>where else the script might be going wrong. Thanks!

I've tested this on version 7, 8, 8.1 and 9 of the O/S, and here's what
I've found.  

1) First of all, you need a space between the $$ and the ] or you
   get a "test: ] missing" error.

2) Having fixed that, I never get the 'failed' to print, *BUT* on 
   version 7 and 8 of ConvexOS when put in a shell script like this:

    #!/bin/sh
    touch /tmp/bad.$$
    rm /tmp/bad.$$
    if [ -f /tmp/bad.$$ ]
    then
	echo failed
	exit 1
    fi

    The shell script itself returns an exit status of 1.  This
    is a problem that can really screw up your makefiles.  
    Fortunately, it's fixed by version 8.1, so if this is your
    problem, an upgrade will fix it.

--tom
--
  "UNIX was never designed to keep people from doing stupid things, because 
   that policy would also keep them from doing clever things." [Doug Gwyn]

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

From: Lee Van Dyke <lvandyke at balboa.eng.uci.edu>
Subject: AT&T 3B2 computer info wanted before 8/20/90 ::::::::))))
Keywords: AT&T 3b2 computer
Date: 17 Aug 90 06:37:32 GMT
To:       info-unix at sem.brl.mil

Does anyone know the general specs. on the AT&T 3B2 ? 
Thanks in advance if anyone can respond before Monday.

Lee Van Dyke
lvandyke at balboa.eng.uci.edu
 

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

From: Ronald Pikkert <ronald at atcmp.nl>
Subject: Re: Changing back slashes to forward slashes
Date: 17 Aug 90 08:28:51 GMT
To:       info-unix at sem.brl.mil

>From article <1990Aug16.194644.14376 at athena.mit.edu>, by ramon at skye.mit.edu (Ramon F Herrera):
<> 
<> I have a question for those {sed, grep, awk, tr} wizards out there.
<> #include "dira\dirb\incl.h"
<> to 
<> #include "dira/dirb/incl.h"
<> 

For a real edit-job use a real editor :-)

script 
 ------
ed - $1 <<@
g/^#include/s/\\\/\\//g
w
@

Invoke this script as: "script prog.c" and it will do the job.
You can run it without having to worry about creating 
temporary files, wich you would need with any of the filters
you mentioned.

Have fun,

-
Ronald Pikkert                 E-mail: ronald at atcmp.nl
@ AT Computing b.v.            Tel:    080 - 566880
Toernooiveld
6525 ED  Nijmegen

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

From: Art Neilson <art at pilikia.pegasus.com>
Subject: Re: Changing back slashes to forward slashes
Keywords: tr, sed, PC, port
Date: 17 Aug 90 10:28:57 GMT
To:       info-unix at sem.brl.mil

In article <1990Aug16.194644.14376 at athena.mit.edu> ramon at skye.mit.edu (Ramon F Herrera) writes:
>
>I have a question for those {sed, grep, awk, tr} wizards out there.
>I'd like to change all the occurrences in a file of a line like this:
>
>#include "dira\dirb\incl.h"
>
>to 
>
>#include "dira/dirb/incl.h"
Gosh, how about this ...
	sed '/^#include/s/\\/\//g' infile > outfile
-- 
Arthur W. Neilson III		| ARPA: art at pilikia.pegasus.com
Bank of Hawaii Tech Support	| UUCP: uunet!ucsd!nosc!pegasus!pilikia!art

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

From: Tom Christiansen <tchrist at convex.com>
Subject: Re: Converting to uppercase/lowercase in sed
Date: 17 Aug 90 09:33:54 GMT
Sender: news at convex.com
To:       info-unix at sem.brl.mil

In article <1990Aug16.232151.23436 at iwarp.intel.com> merlyn at iwarp.intel.com (Randal Schwartz) writes:
>In article <3766 at umbc3.UMBC.EDU>, rostamia at umbc5 writes:
>| Is there a way to convert characters to uppercase or to lowercase in sed?
>	y/a-z/A-Z/
>uppercases the pattern space.  You'll have to juggle the pattern and
>hold spaces if you want just part of a line uppercased.
>
>Or get Perl. :-)

Yes, the y command is a pain because of not being able to act
on just part of a line.

But, um, Randal has (understandably :-) been doing so much perl
he's attributed perl intelligence to sed, which just isn't so.

In sed you really have to do this:

    y/abcdefghijklmnopqrstuvxyz/ABCDEFGHIJKLMNOPQRSTUVXYZ/

And make sure they match up exactly.

--tom
--
  "UNIX was never designed to keep people from doing stupid things, because 
   that policy would also keep them from doing clever things." [Doug Gwyn]

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

From: Maarten Litmaath <maart at cs.vu.nl>
Subject: Re: Converting to uppercase/lowercase in sed
Date: 17 Aug 90 13:09:08 GMT
Sender: news at cs.vu.nl
To:       info-unix at sem.brl.mil

In article <1990Aug16.232151.23436 at iwarp.intel.com>,
	merlyn at iwarp.intel.com (Randal Schwartz) writes:
)In article <3766 at umbc3.UMBC.EDU>, rostamia at umbc5 writes:
)| Is there a way to convert characters to uppercase or to lowercase in sed?
)| In EX the command
)| s/asdf/\U&/
)| changes the string asdf to ASDF, but ed and sed do not seem to be as
)| sophisticated as ex :-(
)| 
)| Any ideas?
)
)yeah, the not very well documented "y" command.
)
)	y/a-z/A-Z/

Doesn't work on SunOS 4.0.3c and a whole lotta other UNIX versions.  :-(

	y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/

POSIX had better fix this...
--
   "UNIX was never designed to keep people from doing stupid things, because
    that policy would also keep them from doing clever things."  (Doug Gwyn)

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

From: Randal Schwartz <merlyn at iwarp.intel.com>
Subject: Re: Converting to uppercase/lowercase in sed
Date: 17 Aug 90 21:18:42 GMT
Sender: news at iwarp.intel.com
To:       info-unix at sem.brl.mil

In article <7331 at star.cs.vu.nl>, maart at cs (Maarten Litmaath) writes:
| )yeah, the not very well documented "y" command.
| )
| )	y/a-z/A-Z/
| 
| Doesn't work on SunOS 4.0.3c and a whole lotta other UNIX versions.  :-(
| 
| 	y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/
| 
| POSIX had better fix this...

Hmm, it would have worked *after* being fed through the sed-to-Perl
translator... :-)

Shows you how much *I've* used that in sed.

Just another (former) sed hacker,
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn at iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

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

From: Chris Elvin <celvin at ee.surrey.ac.uk>
Subject: European X windows User Group Conference
Date: 17 Aug 90 10:41:43 GMT
Sender: news at ee.surrey.ac.uk
To:       info-unix at sem.brl.mil


                EXUG Conference and Exhibition
                    X into the future
                    Guilford Surrey UK
                 24th-26th September 1990

The first residential conference of the European X user Group
will take place at Surrey University, Guilford UK on 24-26th September
1990.

A major Exhibition is being held in conjunction with the conference.
This gives vendors the opportunity to show and sell their products and
services, and allow users to keep up to date with the commercial
market

Conference
==========

Speakers include:

Jim Gettys of Digital -- has worked on  X and Project Athena
since 1984, played a major part in the design of X11: Keynote Speech.

Paul Asente of Adobe -- designed and implemented the X
toolkit: conducting a tutorial, and describing X Server extensions.

Keith Packard of the MIT X Consortium -- use of the X Selections mechanism.

Chris Peterson of ICS and formerly of the X Consortium --
a brand-new interactive resouce editing system.

Jim Fulton of NCD and formerly of the X Consortium --
implementing X for X terminals

Todd Newman of Digital -- worked on implementing the first X server.

PLUS papers on X terminals, PEX, user's experiences using X for
real applications, X development and tools, aids to porting and
migrating non-X programs, graphics tools, etc. etc.


Timetable
=========

Tutorials	&	24 Sept	morning
Conference	&	24 Sept Afternoon -- 26 Sept.
Exhibition	&	25--26 Sept.
BOF's		&	24,25 Sept evenings

Costs   (all costs subject to VAT at 15%)
=====

The exhibition is free and open to the public. Guilford is well served
by road and rail links and there are car parks at the University
We hope to provide a coach service from central London to the University;
more details as they become available.

Costs include the conference and accomodation Monday and Tuesday night,
Evening Meal on Monday, meals on Tuesday and Breakfast Wednesday.
Accomodation with Evening meal and breakfast for Sunday and/or Wednesday
night is available

There will be a conference dinner on Monday 24th September

Conference
 ----------
EXUG members 	250 pounds
non members	300 pounds

Tutorial
 --------
100 pounds

Extras
 ------

Accomodation on Monday/Wednesday   30 pounds per night


For further information:

Tom Yeates
EXUG'90 Exhibition Coordinator
Digital Equipment Co Ltd
Hampshire House
Wade Road
Basingstoke
Hants UK
phone +44 256 843 333
fax +44 256 479 457

or
EXUG Secretary
185 High Street
Cottenham
Cambs
UK
phone +44 954 211 860
fax +44 954 211 244

or
Chris Elvin
Dept of Elec. Eng
University of Surrey
Guilford UK
phone +44 483 509 104
fax +44 483 34 139
email  C.Elvin at ee.surrey.ac.uk

--
Chris Elvin
C.Elvin at EE.Surrey.Ac.UK                    "Beware of low flying butterflies!"
Dept of Elec. Eng, University of Surrey,
Guildford, Surrey, GU2 5XH. England. PHONE: +44 483 509104  FAX: +44 483 34139

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

From: Ad Arts <arts at idca.tds.philips.nl>
Subject: forecasting, measuring, simulation and modeling tools.
Keywords: See subject
Date: 17 Aug 90 11:36:10 GMT
To:       info-unix at sem.brl.mil


I'm posting a question in this news group, because I could not
find another appropriate group.

I would like to know which (CASE ?) tools there are available,
which will help, with respect to modeling, measuring, simulating
and forecasting, of transaction processing applications on UNIX V.3.2
80x86 platforms.

When large applications are developed, the prototypes will not always
tell you what is going to happen with system resources, when instead
of 10 users, 70 users are starting to use the transaction
application/database. System resources/parameters can be memory,
number of inodes, required cache buffer size.

Transaction application writers also experience that they have
written the application in a way that transactions will take much longer
as initially was expected. A system analist, with knowledge of the
internals of operating system and database, can often modify the 
transaction application in such a way that the performance is increased
with e.g. a factor of 5.

I would like to know whether somebody knows of (commercial) applications 
which really help you to solve the above mentioned problem.

Please e-mail responses to: arts at idca.tds.philips.nl

Ad Arts.

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

From: Ray Davis <rdavis at connie.uucp>
Subject: Re: Printing with terminalservers
Keywords: print terminalserver
Date: 17 Aug 90 12:21:45 GMT
To:       info-unix at sem.brl.mil

In <1990Aug16.143007.4690 at diku.dk> harbo at diku.dk (Klaus Harbo) writes:

>I want to be able to hook up printers on terminalservers, so that 
>we can place our printers anywhere in the house. 

I've mailed you a shar file of a program I wrote called tsprintd.
It works on a Convex which has 4.3/sun based networking.  It also
requires named pipes.  Should work on Ultrix unless you have no
named pipes.  If not you should be able to hack it to run
differently.  The basic networking code to get to the terminal
server.  It seems to work with most terminal servers, but it
depends on the server.

Have fun...

Ray Davis
Convex Computer GmbH, Frankfurt, West Germany
unido!connie!rdavis, uunet!convex!rdavis, rdavis at convex.com, +49-69-666-8081

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

From: Lee Van Dyke <lvandyke at balboa.eng.uci.edu>
Subject: Wanted: ftp sites for c-shell programs
Keywords: ftp c-shell
Date: 17 Aug 90 15:14:39 GMT
To:       info-unix at sem.brl.mil

Does anyone know of ftp sites containing various c-shell programs?

Thanks
Lee Van Dyke
lvandyke at balboa.eng.uci.edu
 

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

From: Peter da Silva <peter at ficc.ferranti.com>
Subject: Re: Cshell question: taking wordlists as a single string
Date: 17 Aug 90 15:15:51 GMT
To:       info-unix at sem.brl.mil

In article <3251 at syma.sussex.ac.uk>, andy at syma.sussex.ac.uk (Andy Clews) writes:
> I have a Csh script called "whatnews" ...

>       foreach i ($*)

> Basically, then, can Cshell cope with word-lists as single arguments, or
> must I write a C program to do the job (or try sh or ksh?)

Try sh (not ksh, unless you don't care about portability: sh is more
universally available). By and large, csh is a poor language for writing
programs in. Sh is much better.

for i
do
	...
done

This will properly handle your quoted args.
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com (currently not working)
peter at hackercorp.com

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

From: "Richard C. Dempsey" <lrul00 at dixel.kodak.com>
Subject: herror(3)
Keywords: ftp tahoe
Date: 17 Aug 90 15:43:53 GMT
Sender: news at eastman.uucp
To:       info-unix at sem.brl.mil

I just pulled over unix/4.3BSD-tahoe/src/network/ftp.tar.Z from
wuarchive.wustl.edu.  I can't build it because neither my Ultrix system
or my SunOS 4.0.3 system have herror(3) in their libraries.  What does
it do?  More importantly, where can I get it?

                hp = gethostbyname(host);
                if (hp == NULL) {
                        fprintf(stderr, "ftp: %s: ", host);
 =====>                 herror((char *)NULL);
                        code = -1;
                        return((char *) 0);
                }

I speculate that it prints an appropriate error message, like
ferror(3S) or perror(3) ...

Thanks,
--
Richard C. Dempsey			dempsey at Kodak.COM
Computational Science Laboratory	(716) 477-3457
Eastman Kodak Company			#include <disclaimer.std>
Rochester, NY 14650

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

From: Gary Beckmann <beckmann at endor.harvard.edu>
Subject: Opening for output on a terminal server (was Printing with terminalservers)
Date: 17 Aug 90 15:48:45 GMT
Sender: news at husc6.harvard.edu
To:       info-unix at sem.brl.mil

My question is similar, except it has to do with using modems to call
out--and the modems are connected to a DECserver200.  Right now I have
to go through VMS--and this is *very* unpleasant.  Any help???

(oh, yeah: I'm on Ultrix 3.1 and 4.0 on VAX and DEC stations, but it
seems to me that there should be some standard Unix way of handling
this.)

--
					Gary Beckmann
					beckmann at das.harvard.edu

Disclaimer: This space for sale.
Quote:      "If winning isn't everything, why keep score?"  -- Worf
(Quote typed completely from non-error correcting memory. 
 Parity checks, CRC and corrections accepted)
 

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

From: Jean Marie Diaz <ambar at ora.com>
Subject: Nutshell Handbook on sendmail doesn't exist yet
Keywords: O'Reilly nutshell handbook sendmail
Date: 17 Aug 90 16:02:44 GMT
Sender: news at ora.com
Followup-To: comp.mail.sendmail
To:       info-unix at sem.brl.mil


Apparently, something somewhere on the net led people to believe that
this book is imminent (we've been getting lots of calls about it).
Not so, folks.  We do have someone working on the book, but we don't
have a publishing date yet.  When it's ready, we'll announce it in
comp.newprod--look for it there.

				AMBAR
ambar at ora.com						uunet!ora!ambar
O'Reilly & Associates, Inc.  Publishers of Nutshell Handbooks
90 Sherman Street, Cambridge, MA 02140; 617-354-5800
Book Orders => 632 Petaluma Ave, Sebastopol, CA 95472 
               800-338-NUTS (in CA 800-533-NUTS) FAX 707-829-0104

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

From: phd_ivo at gsbvxb.uchicago.edu
Subject: Re: sort with a tab as separator
Date: 17 Aug 90 17:52:07 GMT
Sender: News Administrator <news at midway.uchicago.edu>
To:       info-unix at sem.brl.mil


I just figured out that it is my shell that actually translates tabs into
spaces.  So, now I need a way to quote a tab (no, quotation marks or
backslash quoting don't work)...

/ivo welch	ivo at next.agsm.ucla.edu

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

From: Anthony Veale <anthony at boulder.colorado.edu>
Subject: Adding on to the history mechanism
Date: 17 Aug 90 19:47:30 GMT
Sender: news at boulder.colorado.edu
To:       info-unix at sem.brl.mil

Hello, world,

I have a programming task that I set myself and I need a bit of advice on how
to integrate this thing into my environment.  Here's a brief on what I want to
do.

I want to add on to UNIX the only good thing that I have found under VMS.
(My work forces my choice of operating system.)  Namely, the VMS equivalent of
the history mechanism.  For those who aren't familiar with it, you type Up-
arrows and Down-arrows to scroll through the history list and you can insert
and delete characters anywhere on the command line.

Now I have a C program that does all but the scrolling through the history
list.  (It already recognizes the Up- Down-arrows, but I haven't implemented
the scrolling.)

What I finally want to do is to squeeze this routine in between my keyboard and
the shell.  (I use csh habitually, but if I could do this generically, so much
the better.)

Here's a schematic.

input --> VMS history --> standard (c)sh input
          ^^^^^^^^^^^
          my program

The implication here is that it should be transparent.  If I have done my prog-
ramming correctly you should be able to never use the VMS history emulation and
never even notice that it's there.

I mention that because I have partially squeezed it in via a csh script to test
things.  But part of the UNIX history mechanism is broken.  (^ replacements
get ignored.)

Please only reply by email, since I do NOT read this group often.

Anthony Veale'   Grad. Student
JILA             anthony at lyra.colorado.edu (or, if closed, try)
UColorado        star.stanford.edu!lyra.colorado.edu!anthony
Boulder, CO      veale at jila.bitnet
Anthony Veale'   Grad. Student
JILA             anthony at lyra.colorado.edu (or, if closed, try)
UColorado        star.stanford.edu!lyra.colorado.edu!anthony
Boulder, CO      veale at jila.bitnet

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

From: John Wilber <wilber at sal-sun11.usc.edu>
Subject: How do I change the number of lines on my term?
Date: 17 Aug 90 19:57:30 GMT
Sender: news at chaph.usc.edu
Nntp-Posting-Host: sal-sun11.usc.edu
To:       info-unix at sem.brl.mil

I'm having troubles changing the number of lines that the OS thinks I
have on my terminal.  Normally, I log into my Unix account here
remotely, and emulate a vt100 (setenv term vt100), and this works fine.
Sometimes, however, I login at an actual workstation, and no matter what
I do, I can't make the OS think that I have more than 25 lines on my
screen.

I am using Sun workstations running Sun OS 4.0.3, and yes I have RTFM'd.
I have tried the following commands:

   setenv term sun
   setenv term sun-34

What's wrong?  Do the terminal parameters only get initialized upon
starting up csh? (I'm using csh).

Thanks,

John
wilber at nunki.usc.edu

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

From: Paul Davis <paul at ncrcam.cambridge.ncr.com>
Subject: UNIX System V.3 benchmarks
Keywords: unix,SVR3,benchmarks
Date: 17 Aug 90 20:12:10 GMT
To:       info-unix at sem.brl.mil

I am trying to obtain a good benchmark suite for Unix System V.3.
If anyone knows of any can you email me information which can tell me
where to find it.
-- 
Please reply by e-mail if possible.  Thanks in advance
Paul Davis
INTERNET: paul at ncrcam.Cambridge.NCR.COM
VOICE: (614) 439-0232                               FAX: (614) 439-0532

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

From: muru at iris.brown.edu
Subject: Automatic notification of file system changes
Date: 17 Aug 90 20:50:14 GMT
Sender: news at brunix.uucp
To:       info-unix at sem.brl.mil


Could anyone tell me what needs to be done for the following sample scenarios
to work on a Sun 4.03 environment?
1) If anyone modifies a file in my home directory, I want a script to be
   triggered that will make a "diff" of the old and new files?

2) Anytime a directory is opened, closed, or modified or a printer is brought
   up or down, I want a signal to be sent to my active process to 
   perform "certain actions."

Specifically, I will appreciate if anyone can tell me how much changes need to
be made at the kernel level, the order of difficulty for a "non-hacker" to make
these changes, and pointers to man pages, manuals, or books.

Thanks.

muru 

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

From: Guy Harris <guy at auspex.auspex.com>
Subject: Re: getting the exit value of an exec'd program
Date: 17 Aug 90 21:11:54 GMT
To:       info-unix at sem.brl.mil

>Its man page describes the union wait status variable
>returned by wait(2) and its variants. (Exact return type also varies
>between wait() variants and diff. unices.)

Don't waste time with "union wait".  BSD isn't *really* different from
other UNIX variants; "wait" *really* fills in an "int", not a "union
wait *".  (If you don't believe me, check out the kernel code that
implements "wait" - it fills in "u_rval2", which is an "int", with the
exit status.)  "union wait" is just a hack that gives the individual
bits of the "int" individual names; unfortunately, it does that with bit
fields, which are C-implementation-dependent, while the actual bits are
C-implementation-*in*dependent.

If you write code not using "union wait", it'll work just fine on BSD
systems - and even pass "lint" in 4.4BSD, although not in earlier
releases, because POSIX says it's an "int", period.  It'll also work on
systems that lack "union wait", e.g. vanilla S5 (at least prior to S5R4;
they may have stuck in "/usr/ucbinclude/sys/wait.h" in S5R4 to make it
easier to recompile BSD programs).  If you write code using "union
wait", and make it generally available, somebody'll probably try porting
it to S5 and have one more porting obstacle to deal with before it
works....

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

From: "Jeffrey R. Feeley" <jeff at cdin-1.uucp>
Subject: Running "The Complete Answering Machine" under DOS emulation
Keywords: complete DOS emulation
Date: 17 Aug 90 21:59:25 GMT
To:       info-unix at sem.brl.mil

Has anyone tried using the voice mail card made by "The  Complete
PC"  under a DOS emulator such as VP/ix or DOS Merge. SCO informs
me that Direct Device Attach (part of SCO Unix  or  O.D.T.)  will
work.  I don't tend to believe such claims until I hear of or see
an actual case.

Thanks in advance for your help.

PS: Excuse my netiquette if its out of line.  This  is  my  first
"postnews".

E-MAIL (work)  ...!uunet!cdin-1!jeff  
jeff at compu.com
phone (800) 223-3282

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

From: Brad Appleton <brad at ssd.csd.harris.com>
Subject: C-shell variables
Date: 17 Aug 90 22:16:14 GMT
Sender: news at travis.csd.harris.com
To:       info-unix at sem.brl.mil

I need to have a C shell variable contain a new-line. Apparently
I can do this at the shell-prompt using:

	% set foo=a"\
	"b
	% echo $foo:q
	a
	b

but the following does not work:

	% set foo=a\
	b
	% echo $foo:q
	a

Regardless, I am required to put my variable setting in a file named "tmp"
and set the variable using:

	% eval `cat tmp`

where "tmp" contains the command to set the variable foo! Unfortunately,
what worked at the shell prompt does not seem to work when I put it in
a file and use eval (regardless of whether or not I use backslashes).

??? SO what must I put into "tmp" to get a newline into $foo:q ???

Please dont post solutions that dont use "eval `cat file`"; such 
solutions will be of no use to me. 

Please dont tell me not to use csh either; I dont usually but in this
particular case it is part of my requirements-spec.

To make matters worse, I cant go translating all newlines in "tmp"
to something else (and then back again) because there may be other
variable settings in "tmp" which may be terminated by a newline (and/or
a semicolon).

This one is giving me a lot of grief because I was hoping that what works
on the command-line would work in "tmp" (which doesnt seem to be the case
for my csh anyway).

PS - If youre curious, the reason I have to deal with all the above is that
     I have a program that will be taking input and spitting out C-shell
     variable settings. The only character I cant seem to preserve from the
     input is the newline character.

advTHANXance
______________________ "And miles to go before I sleep." ______________________
 Brad Appleton        brad at travis.ssd.csd.harris.com   Harris Computer Systems
                          ...!uunet!hcx1!brad          Fort Lauderdale, FL USA
~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~

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

From: Jim Morris <morris at dms.uucp>
Subject: /dev/ptmx, granpt(), ptsname() etc .. HELP
Keywords: ptmx help
Date: 17 Aug 90 23:06:24 GMT
To:       info-unix at sem.brl.mil

Can someone point me at where I can find docs for the ptmx device driver
and the various support routines like  grantpt(), ptsname() and unlockpt().

I would like to understand how X11R4 is talking to its local server
on a system configured for STREAMSCONN and att.

	Thanks
	Jim.


-- 
Jim Morris.         {motcsd|weitek}!dms!morris or morris at dms.UUCP 
Voice	(408) 434-3798
Atari Games Corporation, 675 Sycamore Drive, Milpitas CA 95035 USA
(Arcade Video Game Manufacturer, NOT Atari Corp. ST manufacturer).

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


End of INFO-UNIX Digest
***********************



More information about the Comp.unix.questions mailing list