Positional parameters problem solved by fuska
fuska is very clever.
He implemented positional parameters by creating a command called %. Yes it is called %. So essentially you can do % 1, % 2, % 3, etc.
For example, the googlocal command:
gloc -what {% 1 %s} -where {% 2 %s}[no url encoding]
I was quite stunned when I saw this example, and it took me a couple of minutes to understand how % works its magic. I am so impressed.
He implemented positional parameters by creating a command called %. Yes it is called %. So essentially you can do % 1, % 2, % 3, etc.
For example, the googlocal command:
gloc -what {% 1 %s} -where {% 2 %s}[no url encoding]
I was quite stunned when I saw this example, and it took me a couple of minutes to understand how % works its magic. I am so impressed.
6 Comments:
Very clever. :-)
:)
thank you fuska :)
can it split phrases? i'd love to be able to split "windows security" and "windows 2003 security" into two windows to see how the searches differ!
try this:
multi g windows-security windows-2003-security
If you want to use a range of parameters you can use this
{% 2-4 %s}
for parameters 2, 3, and 4,
if you want to use a range for a certain param all the way till the end, use
{% 3- %s}
for a real life example, see the google group search commnad i just created gg.s
gg.s
Post a Comment
<< Home