I'm trying to use an associative array inside of a bash file. But the bash version is not 4.Or is there a way to include a ksh file into a bash file without it executing as bash
Is there a way to have one line of ksh specific code inside of a bash file?
bash;shell script;ksh
You can try this sort of things :#!/bin/bashksh -c 'typeset -A arrarr['foo']=1arr['bar']=2arr['base']=3print ${arr[@]}'Or using a here-doc#!/bin/bashksh <<'EOF'typeset -A arrarr['foo']=1arr['bar']=2arr['base']=3print ${arr[@]}EOFDisclaimerAs stated by @glenn jackman in the comments, the best you can do is to fully make your script in pure ksh, why bother you with a mix of bash & ksh ?Output3 2 1