tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "C.Ruhnke" <i769646 () smrs013a ! mdc ! com>
To: tru64-unix-managers
Subject: Bourne shell question
Date: Fri, 21 May 1999 20:03:17 +0000	[thread overview]
Message-ID: <96079042215870.tru64-unix-managers.marc@archive.invalid> (raw)

Gurus and wizards,

I am NOT a shell expert (yet!), so I may just be misunderstanding this...

I expect the following script to set the variable mydir to the current
working directory.  If I run it under the Korn shell, it does what
I expect.  If I run it under Bourne shell, then mydir echoes as empty.


#!/usr/bin/ksh
#
# This does not seem to work using sh but does for ksh
#
pwd | read mydir
echo $mydir

The man pages for "read" don't indicate any variation due to shell.
Is this the expected function of "sh" and "ksh"?

--CHRis
-
=============================================================================
Chris H. Ruhnke                         Phone: (314)233-7314
IBM Global Services  M/S S306-6340      FAX  : (314)234-2262
325 J.S. McDonnell Blvd                 Email: Ruhnke@US.ibm.com
Hazelwood, MO 63042

             reply	other threads:[~1999-05-21 20:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-21 20:03 C.Ruhnke [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-04-07 19:49 bourne shell question Morrison, Kathy D.
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox