Results 1 to 5 of 5
  1. #1
    How-To run a script?
    milessthomas's Avatar
    Member Since
    Feb 28, 2007
    Location
    Charlotte, NC
    Posts
    783
    Specs:
    MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3
    How-To run a script?
    **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.

  2. #2
    How-To run a script?
    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    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

  3. #3
    How-To run a script?
    milessthomas's Avatar
    Member Since
    Feb 28, 2007
    Location
    Charlotte, NC
    Posts
    783
    Specs:
    MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3
    Thanks!

  4. #4
    How-To run a script?
    milessthomas's Avatar
    Member Since
    Feb 28, 2007
    Location
    Charlotte, NC
    Posts
    783
    Specs:
    MBP 3.06Ghz, MBP 2.2Ghz, Mini G4, B/W G3 (Media Server), LCII, Beige G3
    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"

  5. #5
    How-To run a script?
    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    That is another good alternative.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to run script when connecting to particular network?
    By bkhl in forum OS X - Operating System
    Replies: 1
    Last Post: 11-06-2010, 04:14 PM
  2. How do I run a script after connecting to a network?
    By dangmug in forum OS X - Operating System
    Replies: 1
    Last Post: 07-29-2009, 01:20 PM
  3. Making script automatically run
    By ruffryder1613 in forum OS X - Operating System
    Replies: 1
    Last Post: 06-09-2009, 11:51 AM
  4. How to use QuickSilver to run my script
    By yinglcs in forum OS X - Operating System
    Replies: 0
    Last Post: 02-09-2009, 08:54 PM
  5. Run a script at login?
    By thermidor in forum OS X - Operating System
    Replies: 2
    Last Post: 08-21-2007, 07:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •