New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

How-To run a script?


Post Reply New Thread Subscribe

 
Thread Tools
milessthomas

 
milessthomas's Avatar
 
Member Since: Feb 28, 2007
Location: Charlotte, NC
Posts: 778
milessthomas is a jewel in the roughmilessthomas is a jewel in the roughmilessthomas is a jewel in the rough
Mac Specs: MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3

milessthomas is online now
**edit** [[Could someone please take the time to refer me to something showing me how to create an icon that when clicked will open terminal and run the command: "telnet 10.157.183.10" It is very urgent that I get this done as this mac is to become our master inventory check in terminal. ]]

I don't really fool around much in the terminal except to log into my offices terminal database.

I've put two new macs in the office and two of my employees are older and don't understand how to enter the commands. Is there a way I can automate the process to run

>telnet 10.157.183.10 (send command)

After that command it automatically logs into the TAMS server and they understand the rest. So how can I get it so they can click an icon, terminal opens, and runs the "telnet 10.157.183.10" command automatically?

Any help would be greatly appreciated.

QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
You could place the following 3 lines into a file and then using the Info panel set the file to be opened in Terminal App when double clicked.

#!/bin/bash
telnet 10.1.0.102
exit


You'll also have to, from the terminal type the followling after you have created the file. I named mine termit.bash. The file needs execute permissions for the people who will run it. You'll need to do this and the ab ove Terminal App association for each system you copy it to.

chmod ugo+x termit.csh
QUOTE Thanks
milessthomas

 
milessthomas's Avatar
 
Member Since: Feb 28, 2007
Location: Charlotte, NC
Posts: 778
milessthomas is a jewel in the roughmilessthomas is a jewel in the roughmilessthomas is a jewel in the rough
Mac Specs: MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3

milessthomas is online now
Thanks!

QUOTE Thanks
milessthomas

 
milessthomas's Avatar
 
Member Since: Feb 28, 2007
Location: Charlotte, NC
Posts: 778
milessthomas is a jewel in the roughmilessthomas is a jewel in the roughmilessthomas is a jewel in the rough
Mac Specs: MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3

milessthomas is online now
I found an alternate way via a member at macrumors.com.

If you open Applescript''s ScriptEditor you can write the following command and save it as an Application Bundle and it will do exactly what I want it to.

(Type in script below)
tell application "Terminal" to do script "telnet 10.157.183.10"

Then click Compile. And go File Menu->Save As->File Name (but save file format as "application bundle"

QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
That is another good alternative.
QUOTE Thanks

Post Reply New Thread Subscribe


« languages in xCode | Is there a way I could write a script to be run with iCal to text me reminders? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Run a script at login? thermidor OS X - Operating System 2 08-21-2007 08:31 PM
how will new Adobe programs run on my computer? flipm3 Apple Notebooks 5 07-30-2007 05:48 PM
Run app from iso image e46ci OS X - Apps and Games 0 05-31-2007 09:31 PM
Can you run Tiger and OS 8.6 on the same computer? RE: Repair Permissions sunshine1 OS X - Operating System 2 04-28-2006 04:02 PM
How well do the new OSs run on the older macs? iRobot Switcher Hangout 7 04-25-2006 11:09 AM

All times are GMT -4. The time now is 12:14 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?