I don't have much experience in bash script but I do know that a software by the name of Script Manager is available in the market and might just help you achieve your goal.
Now with Script Manager you can execute a script you created and place it on a shortcut on the desktop of your phone. The bash script would do any type of calls it needs to do to the PC. As long as your firewalls are well configured and you have port forwarding on the router (if needed) or your on the same wifi network you should be able to do as you need with the tool.
Now also remember, you might want to consider rooting your phone so you can have busybox installed and have a good amount of commands available to you.
"Perfection is my life goal, excellence will be tolerated... WHOA!!"
Stock, Un-rooted T-Mobile HTC One