Then it seems that what you want is running a repl of your chosen language rather than shell/"executable" scripts.