commands in .bash-profile do not work
I added an alias in my .bash_profile file in my home directory on Mac Leopard. For example,
alias preview = "open -a preview"
alias lsall = "ls -l"
When I try to run these commands from the command line, I get the message that command not foun开发者_高级运维d
Any idea what I might be doing wrong? Thanks!
You just need to lose the spaces around =
, i.e.
alias preview="open -a preview"
alias lsall="ls -l"
You also need to name the file .bash_profile
if you want it to be executed automatically when you start a new shell.
精彩评论