Friday, December 16, 2005

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.

6 Comments:

Anonymous Anonymous said...

Very clever. :-)

12/17/2005 12:19 a.m.  
Blogger fuska said...

:)

12/17/2005 7:23 a.m.  
Anonymous Anonymous said...

thank you fuska :)

10/27/2007 2:47 p.m.  
Anonymous Anonymous said...

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!

5/02/2008 9:04 a.m.  
Blogger Jonathan said...

try this:
multi g windows-security windows-2003-security

5/02/2008 9:09 a.m.  
Anonymous Anonymous said...

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

12/05/2011 2:38 p.m.  

Post a Comment

<< Home