...

/

Difference Between Functions and Aliases

Difference Between Functions and Aliases

Learn cases when we should declare a function instead of an alias.

We'll cover the following...

If we want to shorten a long command, we use an alias.

When using the shell, we need a function in two cases only:

  1. We need a conditional statement, loop, or code block to perform our command.
  2. The input parameters are not at the end of the command.
...