6

In BASH, when to alias, when to script, and when to write a function?

view full story
linux-howto

http://unix.stackexchange.com – It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing. But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function? Where aliases are concerned, I use aliases for very simple operations that don't take arguments. alias houston='cd /home/username/.scripts/' That seems obvious. But some people do this: alias command="bash bashscriptname" (and add it to the .bashrc file) Is there a good reason to do that? I (HowTos)