Milestone Bash translation

Completed 11 years ago (06/27/13 16:38:08)

100%

Total number of tickets: 7 - closed: 7 - active: 0

PostProcessing

1 / 1

system

6 / 6

Ksh88 uses an inefficient stack system. When you code the form "for i in <splat>" then ksh attempts to put <splat> on the stack. You're running out of memory : "no space error". However, ksh93 uses a different stack library that is more efficient and should work fine in this case. But still we hits the limit rapidly (PeriodNB=160). Other shells (like "bash") are more adept at handling such a large data set.

We need to be able to run in DRYRUN intensively and for a long time so as to test/stress supervisor development. Bash will help towards this goal especially when it comes to manage the call stack tree (impossible in Ksh when PeriodNB is above a small limit).

Adapt current ksh syntax to bring in modification that function new_libIGCM can cope with (see /ccc/cont003/home/dsm/p86mart/.bash_alias). Goal is that this function will produce a working translation. When not possible add clear comments #BASH EQUIVALENT

Also Bash brings some enhancement towards readability:

a=letter_of_alphabet
letter_of_alphabet=z
echo "a = $a"           # Direct reference.
echo "Now a = ${!a}"    # Indirect reference.
eval a=\$$a             # The ${!variable} notation is more intuitive than the old eval approach
echo "a = $a"
Note: See TracRoadmap for help on using the roadmap.