On Tuesday 08 Jan 2008, Viksit Gaur wrote:
> --- tuxdna <[EMAIL PROTECTED]> wrote:
> > :(){ :|:& };:
> > :
> > : is a Bash Shell's no-op ( no operation ) literal,
> >
> > which can be used
> > as 'true' also.
>
> Hmm, I've never heard the character : referred to as
> such. Perhaps someone can comment on this, although I
> doubt this is the case. IMO, the use of : is just to
> obfuscate the fact that its a function name - it could
> as easily be a or b or c, or fun.
>From man bash:
SHELL BUILTIN COMMANDS
Unless otherwise noted, each builtin command documented in this
section as accepting options preceded by - accepts -- to signify the
end of the options. For example, the :, true, false, and test
builtins do not accept options.
: [arguments]
No effect; the command does nothing beyond expanding
arguments and performing any specified redirections. A zero exit code
is returned.
So effectively a no-op returning true. I use constructs of the form
while : ; do ... done
to make effectively infinite looks all the time.
Regards,
-- Raju
--
Raj Mathur [EMAIL PROTECTED] http://kandalaya.org/
Freedom in Technology & Software || February 2008 || http://freed.in/
GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/ || It is the mind that moves
_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22/23, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi
http://www.mail-archive.com/[email protected]/