Results 1 to 3 of 3
First off I would like to say that I have googled my answer before coming here but I've had no luck(or maybe im blind :P) All I want is to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-13-2013 #1
Simple bash file.
First off I would like to say that I have googled my answer before coming here but I've had no luck(or maybe im blind :P)
All I want is to create a bash file that opens terminal, cd to a directory and runs a command. I've had no luck with getting this to work. Any help?
- 01-13-2013 #2
- Join Date
- Dec 2011
There's a few options here.
If the command is simple:
cd $DIR; xterm -e $COMMAND
#!/bin/sh cd $DIR $COMMAND $arg1 $arg2 $arg3
xterm -e SCRIPT.sh
I use this all the time to create a menu of various config options, for example. Once the script terminates, the xterm goes away too. If you want to see the output of the command, put a 'read' at the end of the script so it will wait for a keypress before closing.
Hope that helps.
- 01-13-2013 #3