System pause in linux script

Sometimes, you need to make a pause in your Linux script. For instance, you want to see the result of your script when you’re executing it from the window system. In my case, when I want to open an executable script file from gnome, it asks me if I want to open it in a new bash. If I say yes, it executes it and close the window. I don’t have the time to see any output, so I’m writing this at the end :
read a

The system wait for a keyboard input. The input is finish after pressing the « enter » key. Pressing it, the window closes itself (when executing from the window system)

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *