Results 1 to 10 of 10
Hi all,
I need to make a alias and I am a little confussed how to do it. As some websites say it has to be in profile and other ...
- 01-15-2010 #1Just Joined!
- Join Date
- May 2008
- Posts
- 38
Creating an alias on universtiy server
Hi all,
I need to make a alias and I am a little confussed how to do it. As some websites say it has to be in profile and other says it goes in bashrc.
on the server I have these files
bash_history
bash_profile
bashrc
cshrc
dtprofile
login
mysql_history
newsrc
I been trying to do this and think may have problem now as when I log in I get error it says bash_profile syntax error unexpected token 'fi'
many thanks
- 01-15-2010 #2
it can go in any file as long as that file gets sourced when you log in
.bashrc and .bash_profile are the most common to us
can you post exact error message or at least contents of the file?
- 01-15-2010 #3Just Joined!
- Join Date
- May 2008
- Posts
- 38
# Login shell
if [ -r $HOME/.bashrc ]; then
source $HOME/.bashrc
fi
that the bash_profile
and this is bash rc is
#Non-login interactive shells
# Set DISPLAY if coming from an X display and not already set.
if [ -z $DISPLAY ]; then
if [ $TERM ]; then
if [ `echo $TERM | grep xterm` ]; then export DISPLAY=`/usr/local/bin/xdisplay` ; fi
fi
fi
export PATH=~/bin:`/usr/local/bin/localpath -sh`:/usr/bin:/usr/ucb:.
alias cake="php /proj/name/project/leader/cgi-bin/cake_1.2.5/cake/console/cake.php"
umask 022
however when i try it i get unknow bash command
thanks
- 01-15-2010 #4
nothing obviously wrong jumps out at me, hopefully someone else has better eyes
- 01-15-2010 #5
Do you have the php cli package installed?
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-16-2010 #6Just Joined!
- Join Date
- May 2008
- Posts
- 38
I am not sure as this is university server we are using php so I would guess so
- 01-16-2010 #7
OK, it may be a path issue...
Try running "which php" and using the full path in your script. If you get no response from which php then the cli is not installedIf we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-16-2010 #8
which command will only tell you if it is in your path or not, not if it is installed
you could try locate php instead
- 01-17-2010 #9
locate will show everything with php in the name so you may get a lot of output.
I've just learned something about which. Thanks
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-17-2010 #10Just Joined!
- Join Date
- May 2008
- Posts
- 38
what I dont get if I try have it as alias it dont work if i type the command alias line into command line then type cake it works so it werid


Reply With Quote