Boner:
When doing an alias, you don't want to use backticks. The use of backticks in a bourne based shell is to substitute the output of the command between the backticks in place of that string. I guess that makes no sense.
What I mean is if for example you had a command called foo, which does nothing than output "bar". Then if you aliased baz in the method that you specified, when you call baz it would try to call a command bar which may or may not exist. ie:
$ foo
bar
$ alias baz=`foo`
$ baz
bash: bar: command not found
You actually want to use single quotes or double quotes. ie:
$ ls
bar baz foo
$ alias ll='ls -l'
$ ll
total 0
-rw-r--r-- 1 dave dave 0 Sep 20 16:35 bar
-rw-r--r-- 1 dave dave 0 Sep 20 16:35 baz
-rw-r--r-- 1 dave dave 0 Sep 20 16:35 foo
Of course, this doesn't just apply to alias, but bourne derived shells in general (and most also applies to korn and c shells).
Hope that clarifies things.
|