image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
LinkBack Thread Tools
  #1  
Old July 24th, 2003, 08:13 PM
shadowfax's Avatar
Registered User
 
Join Date: Mar 2003
Location: Rohan, Middle Earth
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
shadowfax is on a distinguished road
Unhappy path variable

Hi,

I have downloaded rar and stored under /application

and I was wondering how can I set a path variable where I can invoke rar anywhere, and I am using bash if that makes a difference. Thank you!
Reply With Quote
  #2  
Old July 25th, 2003, 03:10 AM
slur's Avatar
Geek / Hedonist
 
Join Date: Dec 2000
Location: Florence, MA
Posts: 542
Thanks: 0
Thanked 0 Times in 0 Posts
slur is on a distinguished road
two tips

I believe that ~/bin is already part of the shell path. If you put rar in a folder called bin in your home directory then it will be found by the shell. (You may have to run the "rehash" command if the terminal is already open, although I don't think this command exists in bash.)

I don't recommend dropping a bunch of unix binaries into your Applications folder. It's not really the appropriate place for them. /usr/local/bin or ~/bin is a wiser choice.

That said, you can add other directories to your $path by adding a command like the following to a file called .bashrc in your home directory:

export PATH=/Applications:$PATH
__________________
|
| slur was here
|

check out my creative music software

Last edited by slur; July 25th, 2003 at 03:17 AM.
Reply With Quote
  #3  
Old July 25th, 2003, 12:01 PM
shadowfax's Avatar
Registered User
 
Join Date: Mar 2003
Location: Rohan, Middle Earth
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
shadowfax is on a distinguished road
Thanks for your help.
Reply With Quote
  #4  
Old July 28th, 2003, 12:15 PM
btoneill's Avatar
keeper of the cheese
 
Join Date: Jul 2002
Location: Minneapolis, MN
Posts: 797
Thanks: 0
Thanked 0 Times in 0 Posts
btoneill is on a distinguished road
Create a .bashrc file in your home directory, in that file put:
PATH=$PATH:/path/you/want/to/add
export PATH

That will add in /path/you/want/to/add to the search path. If the rar app is sitting in /Applications, add in:
PATH=$PATH:/Applications
export PATH


Brian
__________________
UNIX is simple and coherent, but it takes a true genius (or a programmer at any rate) to understand and appreciate its simplicity -- Dennis Ritchie
Reply With Quote
Reply

Bookmarks

Thread Tools

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Path Finder (ex-SNAX) - great Finder replacement celeborn Mac OS X System & Mac Software 2 January 18th, 2003 10:48 PM
Shell script to rip form variable names to a file? michaelsanford Bob's Place 2 November 15th, 2002 07:41 PM
TERM_PROGRAM: Undefined variable. holmBrew Unix & X11 9 September 23rd, 2002 07:17 AM
Help! Trying to update the PATH variable info yoyo1234 Mac OS X System & Mac Software 11 August 28th, 2002 01:04 PM
troubles installing Perl modules with CPAN.pm yogi Mac OS X System & Mac Software 7 April 26th, 2002 11:38 AM


All times are GMT -5. The time now is 04:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright 2000-2010 DigitalCrowd, Inc.