I use a shared .profile for bash and ksh93, I have a ksh93 specific section which I want to separate through the following construct:
if ( test -n "${.sh.version}" ) 2>/dev/null; then echo "ksh" fi bash just hangs while it works in POSIX shell and ksh93. A bash script with above contents also works as expected. Why is this?