I couldn't reproduce your bug; the window always closes immediately after opening with your examples.
I tried: gnome-terminal --command "sh -c 'echo test; cat'" which would display the text in all cases.
I couldn't reproduce your bug; the window always closes immediately after opening with your examples.
I tried:
gnome-terminal --command "sh -c 'echo test; cat'"
which would display the text in all cases.