[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible Bug in BASH

From: Matthew Strax-Haber
Subject: Possible Bug in BASH
Date: Sat, 20 Jun 2009 14:18:34 -0400

I think I may have found a bug in BASH 3.2.17(1)-release on a mac.
Below is a simple demonstration of the unexpected behavior:

mattsh$ alias c=clear
mattsh$ c () { echo foo; }
mattsh$ clear

mattsh$ alias c=clear
mattsh$ function c () { echo foo; }
mattsh$ clear
[blanks screen]

The documentation for 'function' states:
function: function NAME { COMMANDS ; } or NAME () { COMMANDS ; }
    Create a simple command invoked by NAME which runs COMMANDS.
    Arguments on the command line along with NAME are passed to the
    function as $0 .. $n.

According to this, "function NAME { COMMANDS ; }" and "NAME () { COMMANDS ; }" should be equivalent. If a change is made to either the documentation or code, I would appreciate a mention, although this is not required. Regardless, please let me know either way.
~Matthew Strax-Haber
Co-op, NASA, Langley Research Center
Undergrad, Northeastern University

reply via email to

[Prev in Thread] Current Thread [Next in Thread]