LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can Any One assist me (https://www.linuxquestions.org/questions/linux-newbie-8/can-any-one-assist-me-833621/)

alyssasdaddy 09-21-2010 02:43 PM

Can Any One assist me
 
In making a shell script to run 3 commands to get my tether up without running a bunch of commands?

Here are the commands i have to run in shell

Code:

root@Laptop:/home/chris# easytether enumerate
###########
root@Laptop:/home/chris# easytether connect
connection established
run 'sudo dhclient easytether0' to configure the network interface
press Ctrl-C to disconnect

The i have to run:

Code:

dhclient easytether0
In a separate window

Andrew Benton 09-21-2010 03:23 PM

If you want to put a job into the background and return the command prompt you can put & at the end of the line
Code:

#!/bin/bash
easytether enumerate
easytether connect &
dhclient easytether0

The problem with this is that the "easytether connect" command will exit when you close the terminal window. You could get around that by putting the commands in a bootscript

alyssasdaddy 09-21-2010 03:35 PM

Thanks i will try this.


All times are GMT -5. The time now is 10:41 PM.