problems with aliases on Mac


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers problems with aliases on Mac
# 1  
Old 08-05-2007
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  
Old 08-05-2007
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  
Old 08-05-2007
OMG thank you zazzybob, I made the changes you said and I works perfectly Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. OS X (Apple)

Problems with path using UNIX tools in mac

Hello, Glad I found this forum.... Well I'm starting using UNIX tools in macOS for bioinformatics (Python....). I know that in UNIX every installed tools go to usr/bin.... But since in mac I do not have access to it I wanted to know were to create and install tools? Can I recreate a pseudo UNIX... (3 Replies)
Discussion started by: 454rocks
3 Replies

2. Shell Programming and Scripting

etc aliases

Hello: i have several server with own etc aliases. right now i want to combine it all into a general etc aliases in a new freebsd server. cause it consist hundred thousand of record user inside how to make a shell script to combine it or configure it. all etc aliases record example: ... (0 Replies)
Discussion started by: peterLfs
0 Replies

3. UNIX for Dummies Questions & Answers

Problems installing a program through Terminal in Mac OS X

Hey all.. I have a problem with the BitTorrent client called Deluge. (Deluge BitTorrent Client). Followed the guide on their homepage, but can't get it to work. First of all I have installed Xcode Tools 3.0 and MacPorts. I did the "sudo port install deluge" command, and all packages seemed to... (1 Reply)
Discussion started by: Sixmax
1 Replies

4. UNIX for Dummies Questions & Answers

Urgent help with web design problems - mac, safari and unix computer

Hi (Help, Help, Help) I am on a computer course and have designed a web site as one of my assignments. just before Xmas my college tutor "very kindly" viewed my site with a mac, safari browser and unix operating system computer. This is what she Emailed back to me, and I am trying to sort... (3 Replies)
Discussion started by: skylark167
3 Replies

5. UNIX for Dummies Questions & Answers

aliases

Is there a way to view what aliases are running on a given session? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

6. Programming

aliases

Hi. I have a C program that is using the **environ pointer and I am trying to set up aliases for a system("/bin/ksh") call. This works for other environment variables but not for the aliases. Does anyone know if this can be done? Thanks ahead of time. (1 Reply)
Discussion started by: mluey61
1 Replies

7. UNIX for Dummies Questions & Answers

UNIX mode in Mac OSX - problems

I am a Macintosh using OS 10.2 which has Unix underpinnings. When entering console mode (the root system where unix takes over) I get the following message - bootstrap_look_up () failed (ipc/send) invalid destination port I always used to get a localhost# prompt (and then can use unix... (1 Reply)
Discussion started by: ngilman
1 Replies
Login or Register to Ask a Question