Re: csh to bash



On 2010-10-18, Sidney Lambe wrote:
On comp.unix.shell, Icarus Sparry <i.sparry+un@xxxxxxxxx> wrote:

Like many others, I use shell aliases when they are convenient.

The reason Chet includes aliases in bash and covers them in the
man page is because they are useful.

Can you give a single instance where an alias would work better
than a function?

If you and Chris F.A. Johnson want to limit yourself to just
functions (which I also use at will), then knock yourselves out.

You have it backwards. It is aliases which are limiting, not
functions.


--
Chris F.A. Johnson, author <http://shell.cfajohnson.com/>
===================================================================
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)

.



Relevant Pages

  • Re: csh to bash
    ... perfectly valid shell builtin doesn't exist, but I find aliases ... Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ...
    (comp.unix.shell)
  • Re: Defining alias function with parameters?
    ... Aliases and functions are different animals. ... Note that the bash man ... The shell treats several parameters specially. ... * Expands to the positional parameters, ...
    (comp.os.linux.misc)
  • Re: How to pass .alias definitions to bash?
    ... > and put some aliases inside. ... > Everything works fine as long as I work under the default shell ksh. ... > At certain times I want to switch to bash. ... > Is there a preferable solution where only one declaration is needed for both ...
    (comp.os.linux.misc)
  • Re: How to pass .alias definitions to bash?
    ... > and put some aliases inside. ... > Everything works fine as long as I work under the default shell ksh. ... > At certain times I want to switch to bash. ... > Is there a preferable solution where only one declaration is needed for both ...
    (comp.unix.questions)
  • Re: How to pass .alias definitions to bash?
    ... > and put some aliases inside. ... > Everything works fine as long as I work under the default shell ksh. ... > At certain times I want to switch to bash. ... > Is there a preferable solution where only one declaration is needed for both ...
    (comp.unix.shell)