Professional Web Applications Themes

How to run a command line tool? - Mac Programming

Hi, A few of the Apple code examples build command line tools rather than proper apps. How do you 'run' these apps? I'm not talking about specific usage for any particular one, but just generally? This unix stuff is new to me. Thanks LB...

  1. #1

    Default How to run a command line tool?

    Hi,

    A few of the Apple code examples build command line tools rather than
    proper apps. How do you 'run' these apps? I'm not talking about specific
    usage for any particular one, but just generally?

    This unix stuff is new to me.

    Thanks

    LB

    Laura Guest

  2. #2

    Default Re: How to run a command line tool?

    In article <blrdun$oru$btinternet.com>,
    com says... 
    Open Terminal.app and type:

    cd path/to/the/app
    ../appname

    James Guest

  3. #3

    Default Re: How to run a command line tool?

    In article <blrdun$oru$btinternet.com>,
    Laura <com> wrote:

     

    Run 'Terminal', which you'll find in the /Applications/Utilities folder.
    Type in a command and it'll run that command.

    You may want to pick up the book "Learning Unix for Mac OS X", or
    something similar. It should teach you how to use command line tools on
    Mac OS X.
    Wayne Guest

  4. #4

    Default Re: How to run a command line tool?

    Laura wrote:
     

    The Terminal application will get you to a shell prompt;
    it's under /Applications/Utilities. It's the third entry on my dock.

    Use an editor to customize your shell "rc" file ("rc" == "run command" from
    ages ago). In System Preferences under Users you can change your login
    shell (or was that in NetInfo???). I set mine to 'bash' since I used it on Linux
    for many years, and it's close enough to 'ksh' on the commercial systems.
    Whichever shell you use, read up about it in it's man page: "man bash"
    for example. Here's part of my '.bashrc' file:

    ======
    export PATH=${PATH}/bin:/usr/local/bin:/usr/X11R6/bin:/Developer/Tools

    # shell prompt with current directory in reverse/bold
    # [\u\h \W]\$
    SS=`tput smso;tput bold`
    SE=`tput rmso`
    export PS1="\[${SS}\] \W \[${SE}\] \$ "
    unset SS SE

    alias l="/bin/ls -CF"
    alias er="tput clear"
    alias ldd="otool -L"
    ======

    The PATH looks weird because the default path ends with our HOME,
    but I keep my own commands in my 'bin' directory. (And, "Look, ma! No dots!")

    Lucent has some PDF/PS re-creations of the V7 doents at
    http://www.cs.bell-labs.com/

    Grab the PDF files of Volumes 2A and 2B and read some of the original
    papers from the guys who started it all:

    vol2/beginners - tutorial
    vol2/shell - the command interpreter
    vol2/cacm - Original CACM paper on Unix
    vol2/implement - implementation of system

    The book 'UNIX Programming Environment' by Kernighan/Pike is a solid
    intro into scripting and program development on UNIX, including a touch
    of lex and yacc and (gasp!) doentation! :-)

    The other books by the Bell Labs guys are also great:
    AWK Programming Language
    The Practice of Programming
    No fluff, just good examples and direct writing.

    http://cm.bell-labs.com/cm/cs/index.html
    http://cm.bell-labs.com/cm/cs/books.html

    Can you tell I like UNIX? I have, ever since '78! :-)
    Good luck in your explorations!


    Mike Guest

  5. #5

    Default Re: How to run a command line tool?

    Thanks for all the help.
    As to the original enquiry, I was lacking the "./".
    (Amazing how many web OSX-Unix guides I've read that don't mention it.)





    Laura Guest

  6. #6

    Default Re: How to run a command line tool?

    In article <bm0sn8$6bv$btinternet.com>,
    Laura <com> wrote:
     

    They probably added . to their PATH variable and then forgot that it
    wasn't standard. Many UNIX-like OSes come with . in PATH by default, and
    so people are used to it. However, it's a security risk (see previous
    threads in this group and probably lots of web pages) and isn't really
    the best policy.
    Michael Guest

Similar Threads

  1. msyql command line tool can't handle del character
    By gaetanoortisi@yahoo.it in forum MySQL
    Replies: 1
    Last Post: March 4th, 07:30 PM
  2. text line spacing and line tool
    By Ernst_Schneider@adobeforums.com in forum Adobe Indesign Windows
    Replies: 1
    Last Post: April 29th, 12:14 AM
  3. RUN/execute a Command-Line command from an ASP page
    By Lucas Cowald in forum ASP.NET Building Controls
    Replies: 1
    Last Post: October 22nd, 04:26 PM
  4. RUN/execute a Command-Line command from an ASP page.
    By Lucas Cowald in forum ASP Components
    Replies: 7
    Last Post: October 22nd, 01:08 PM
  5. I have drawn a line using Line tool in FW
    By anwar in forum Macromedia Fireworks
    Replies: 2
    Last Post: September 23rd, 11:29 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139