Search Results

Search: Posts Made By: zaxxon
7,715
Posted By zaxxon
Fine that it works, but you still have these in...
Fine that it works, but you still have these in there which redundant since you already declared the array.... (why do I have to type everything 3 times :D ;) )


cat test1.ksh:

......
7,715
Posted By zaxxon
When you declare an array with set -A arr1...
When you declare an array with

set -A arr1 "APPS_DEV" "TEST_DEV"

then you don't have to it twice with

arr1[0]="APPS_DEV"
arr1[1]="TEST_DEV"


That's redundant. Just stick to the 1st line...
7,715
Posted By zaxxon
I doubt you yet tried all examples I have given....
I doubt you yet tried all examples I have given. So I again... I start to having a lot of Deja Vues in this thread... try this:


cat test1.ksh


#! /usr/bin/ksh
set -A arr1 "APPS_DEV"...
7,715
Posted By zaxxon
Try another version ksh.
Try another version ksh.
7,715
Posted By zaxxon
Again, there is no need to invoke the script with...
Again, there is no need to invoke the script with "sh". Just use "./scriptname".

Also as already suggested, maybe use a different ksh on a different box or on the same, doesn't matter.
7,715
Posted By zaxxon
For the case you want all elements of the array...
For the case you want all elements of the array from test1 as a single element of the array in test2, you could write it like this:


root@isau02:/data/tmp/testfeld> cat test1.ksh
#! /usr/bin/ksh...
7,715
Posted By zaxxon
I did not say it will work when you remove sh - I...
I did not say it will work when you remove sh - I said it is not needed.
Just use ./ to execute the test2.sh

Also when this are explicit kornshell scripts by using #!/usr/bin/ksh, maybe just call...
7,715
Posted By zaxxon
No idea - works flawless with pdksh and AIX ksh. ...
No idea - works flawless with pdksh and AIX ksh.
You can leave out the extra "sh" in front of calling the second script. You want ksh anyway. Maybe try with another version of ksh.
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 03:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy