Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Ksh Misbehaves - Needs The Nanny

RE: Ksh Misbehaves - Needs The Nanny

From: Post, Ethan <Ethan.Post_at_ps.net>
Date: Tue, 5 Apr 2005 15:54:56 -0500
Message-ID: <E5D2567DDF0D03428A15664A78CA473C026BB5@pscdalpexch02.perotsystems.net>


That will work because it is in the same shell, the subshell does not pass back the variable assignments. When you "cat file | " you are opening a subshell. =20

Lesson to be learned here, if you are porting to Linux be very carefull if you have a lot of shell scripts! I think the same problem is in bash since the link I sent in the last email related to bash.

-----Original Message-----

From: Kevin Lange [mailto:klange_at_ppoone.com]=20 Sent: Tuesday, April 05, 2005 3:51 PM
To: Post, Ethan; oracle-l_at_freelists.org
Subject: RE: Ksh Misbehaves - Needs The Nanny

Try

echo "1\n2\n3" > cat.file

for i in `cat cat.file`
do

   case ${i} in

  1. X=3DIN ;; esac done

--

http://www.freelists.org/webpage/oracle-l Received on Tue Apr 05 2005 - 16:59:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US