The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
man aliases Pipa UNIX for Dummies Questions & Answers 2 09-19-2007 07:55 AM
/etc/mail/aliases Kumarsharad Shell Programming and Scripting 1 07-16-2007 02:57 AM
retireving ip aliases caltiger High Level Programming 2 09-16-2006 02:36 AM
aliases BG_JrAdmin UNIX for Dummies Questions & Answers 1 11-30-2005 11:53 PM
aliases mluey61 High Level Programming 1 04-19-2005 12:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-05-2007
blowFish@ubuntu blowFish@ubuntu is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 16
problems with aliases on Mac

so I have my .profile set up as such


Code:
##
# DELUXE-USR-LOCAL-BIN-INSERT
# (do not remove this comment)
##
echo $PATH | grep -q -s "/usr/local/bin"
if [ $? -eq 1 ] ; then
    PATH=$PATH:/usr/local/bin
    export PATH
fi

# Aliases
ALIAS=~/.alias
export ALIAS
.$ALIAS

and my .alias as

Code:
# begin .alias

alias del="rm -i"
alias dir="ls -al"
alias search="grep"
alias edit="vim"

now I must have screwed up because none of my aliases work :*(
Im sure its cause Im a *nix noob
  #2 (permalink)  
Old 08-05-2007
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
You need a space between the . and $ in .$ALIAS

. $ALIAS

Also; the shell may be having trouble expanding the tilde, so specify it thus:

ALIAS=$HOME/.alias

Check that you don't have a .bash_profile (or .bash_login) if you're using bash, or it'll ignore .profile altogether - check the "INVOCATION" section of the bash manpage for more.

EDIT: Here's the pertinent section from the manpage
Quote:
it first reads and executes commands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and
executes commands from the first one that exists and is readable.
Cheers
ZB
  #3 (permalink)  
Old 08-05-2007
blowFish@ubuntu blowFish@ubuntu is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 16
OMG thank you zazzybob, I made the changes you said and I works perfectly
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 02:45 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0