Re: help with writing script
Quote:
Originally Posted by bob58
I need to wite a very small simple script and save it to desktop to run when i need to. It is an TELNET session that runs in the Konsole. At the prompt: bob@Gateway:~$ I type in "telnet", without quotes, then "open" and then "n7us.net" So it looks like this:
bob@Gateway:~$ telnet <enter>
telnet> open n7us.net <enter>
Then it connects to the ham radio site where I can sign in. I need to know how to make a script that would do this instead of me having to type it in each time. I need the commands to:
1. bring up the Konsole
2. have it put in the command "telnet"
3. have it put in the command open n7us.net
4. have it enter/carraige return
then i can take control from there.......any ideas???? bob
Try makeing a script called telconnect.sh (You can use a standard txt file)
Open it and put in
Then open up a consol type
su
chmod a+x /directory/telconnect.sh
then just type /directory/telconnect.sh (or ./telconnect.sh if your in the directory.)
*edited, fixed it