Re: [foxboro] while...do defunct?

Douglas G. Lloyd wrote:

> I've also noticed that many shell scripts that worked fine in NT/MKS no
> longer work or produce very different results in XP/MKS.  In most =
> instances,
> the scripts execute with no errors, but don't do what they are "supposed =
> to
> do".  Since a lot of script development tends to be "borrow and modify =
> and
> test and evolve until it works", I'm really not happy about having to
> revisit many years worth of scripting efforts and starting over again.  =
> So,
> I keep an old hard drive with an NT system and am hoping for an answer =
> to
> this problem.

Douglas,

in short, statements like:

ls | while read FILE
do
    echo $FILE
done

no longer work (the loop is executed only once). As a workaround you can 
use something like:

ls >t.txt

while read FILE
do
    echo $FILE
done <t.txt

rm t.txt

I think there is no workaround that doesn't require modification of the 
script in question.


> Has anyone found an alternative Bourne-like shell for XP that behaves =
> like
> the old NT/MKS shell?  I've downloaded a huge (+220MB) "Windows Services =
> for
> Unix 3.5" package from MS that includes a Korn shell and a C shell, but
> haven't had time to test them out for NT/MKS compatibility.

I know of several other packages:

o Cygwin (www.cygwin.com) which is a GNU system (Linux-feel) in Windows
o Windows Services for Unix from Microsoft 
(http://www.microsoft.com/windows/sfu). This also contains some other 
interesting stuff auch as NFS support
o U/WIN from AT&T (http://www.research.att.com/sw/tools/uwin)
o Interix (www.interix.com) which is commercial

I haven't tested any of these packages with I/A and I wouldn't recommend 
doing so in a production environment. To me it seems that the best thing 
would be if the while...read bug was fixed.

Regards,

-- 
Sascha Wildner
erpicon Software Development GmbH
Neusser Str. 724-726
50737 Köln
Germany

Phone: +49 221 9746069
Fax:   +49 221 9746099
eMail: swildner@xxxxxxxxxx

 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             http://www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: