Difference between revisions of "Noop"

From Scriptwiki
Jump to: navigation, search
(Added as new)
(No difference)

Revision as of 20:30, 18 April 2007

Noop is a command that does literally nothing and doesn't care about any parameters.

/noop

What is it good for, then?

It is a handy command when you need to evaluate some identifier without using the actual result. For example, you may want to evaluate a $regex identifier without using the information how many results it returns, just to later use the back-references it creates. Another example is $findfile which has a command option in itself, and therefore doesn't need any outside commands to handle its results.

For example:

noop $regex(I have 6 brothers,/I have (\d+) brothers/) | echo -ag The number of brothers is $regml(1)