I have several simple files that I use in main screen shortcuts to point my VPN to various locations. They are very simple and take the following form:
#!/bin/sh
windscribe connect seattle
I would like to make a file to keep in the same place that would then let me check if the command above is successful, instead of my usual method of checking, which involves opening a Terminal window and entering "windscribe status", after which windscribe will display my VPN location back into the same Terminal window. I haven't been able to figure out how to write a file that will do this. The closest I have come is finding that "xterm" will, in fact, open a Terminal window, but nothing I write afterwards in the script runs or appears in the Terminal window. How can I do what I want?
Another thought I had about it is that perhaps there would be a way to write the file just as
#!/bin/sh
windscribe status
but add something to the second line that would cause the result of the second line to display in a terminal window (or in something else that would be visible to me on the desktop). The word "pipe" comes to mind, but I'm really ignorant about this stuff even though I can sometimes hack out something that will work for me!