scripting, no-op statements in bash function (was: SATA hot swap)
VirginSnow at vfemail.net
VirginSnow at vfemail.net
Wed Jun 10 12:36:50 EDT 2009
VirginSnow at vfemail.net writes:
> In message <20090610153306.88BE3918088 at c-98-216-200-60.hsd1.ma.comcast.net>, "Michael ODonnell" writes:
> >
> >
> > I had a look at /sbin/rescan-scsi-bus.sh - it's not the most elegant
>
> > One thing I noticed was that some of the functions in that script are
> > constructed thus:
> >
> > funcName ()
> > {
> > : funcName
> > otherStuffHere
> > }
> >
> > ...and I wonder if those no-op constructions have some value, maybe
> > during development or debugging, maybe forcing the function name into
> > a parameter list?
>
> Two possibilities come to mind: grepping for ": funcName" and storing
> funcName in $_.
Also, if ":" was redefined to point to a debugging script, it would be
called, with the function name as an argument each time a function is
called. Good for tracing, maybe?
More information about the gnhlug-discuss
mailing list