Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to run a command line tool?

 
   Soft32 Home -> Mac -> Programmer Help RSS
Next:  Localizing a program  
Author Message
Laura

External


Since: Aug 21, 2003
Posts: 16



(Msg. 1) Posted: Mon Oct 06, 2003 4:51 am
Post subject: How to run a command line tool?
Archived from groups: comp>sys>mac>programmer>help (more info?)

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
Back to top
Login to vote
James Weatherley

External


Since: Aug 18, 2004
Posts: 58



(Msg. 2) Posted: Mon Oct 06, 2003 6:07 am
Post subject: Re: How to run a command line tool? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <blrdun$oru$1@sparta.btinternet.com>,
nospam_lbassett.TakeThisOut@bigfoot.com says...
> 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
>
>
Open Terminal.app and type:

cd path/to/the/app
../appname
Back to top
Login to vote
Wayne C. Morris

External


Since: Jun 28, 2003
Posts: 947



(Msg. 3) Posted: Mon Oct 06, 2003 10:49 am
Post subject: Re: How to run a command line tool? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <blrdun$oru$1@sparta.btinternet.com>,
Laura <nospam_lbassett DeleteThis @bigfoot.com> wrote:


> 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?

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.
Back to top
Login to vote
Mike Hall

External


Since: Aug 11, 2003
Posts: 7



(Msg. 4) Posted: Mon Oct 06, 2003 1:12 pm
Post subject: Re: How to run a command line tool? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Laura wrote:

>A few of the Apple code examples build command line tools rather than
>proper apps. How do you 'run' these apps?

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 documents 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!) documentation! Smile

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! Smile
Good luck in your explorations!
Back to top
Login to vote
Laura

External


Since: Aug 21, 2003
Posts: 16



(Msg. 5) Posted: Wed Oct 08, 2003 6:34 am
Post subject: Re: How to run a command line tool? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.)
Back to top
Login to vote
Display posts from previous:   
       Soft32 Home -> Mac -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
  Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]