Environment : KornShell (ksh)
I am exporting variables using:
eval $(echo '"EffTimeStamp=20110203-210000#InputCtxNm=Forigen Exchange Today#RunType=EOD"' |
sed 's/^"/export /g;s/=/="/g;s/#/"\nexport /g')
And trying to display values of these variables dynamically:
eval $(echo EffTimeStamp=20110203-210000#InputCtxNm=Forigen Exchange Today#RunType=EOD|sed 's/^/echo $/g;s/=/="/g;s/#/"\necho $/g' | sed 's/=.*$//g')
But I am getting output as :
20110203-210000 echo Forigen Exchange Today echo EOD
I am not able to figure out why extra echo(s) is(are) displayed in it this not a satisfactory Output. It should be like below:
20110203-210000
Forigen Exchange Today
EOD