[Solved] Terminal: --noclose / hold parameter

Hi. I’m trying to create an bash script that open a Terminal window and pass a command to it.

So, basically my script looks like:

#!/bin/sh
Terminal <command-to-run> 

However, I need that the Terminal window keep open after the command execution finish.

There is some equivalent to the --noclose or --hold paramer to run Terminal?

Thanks!

You can do something like …

#!/bin/sh
Terminal /bin/sh -c '<command-to-run>; read'

which will use the read command to wait until you press the enter key before closing the Terminal window.

2 Likes

Thank you!!! Your suggestion worked perfectly!

Thanks a lot!