First command to use ifThen command
Wow! Fuska sent me an email about a command he created called Microsiervos. The cool thing about this command is that it is the first command to use Allen Ormond's ifthen command. And it does what some of you have requested: go to one URL if an argument is given; another URL if no argument is given. I was not aware that the problem could be solved in this way. Fuska writes:
I created a new command to search in microsiervos.com a spanish blog that I recommend you (it isn`t mine).I'm really impressed! It takes a village to build a command line!!
The interesting thing about this command is that this is the first command which uses the ifthen command. At least I didn't find any other command.
The ifthen command changes the url pointing to the main page(if there isn't search query) or to the search page
The code of the command is this:
http://www.microsiervos.com{ifThen -value1 %s -value2 -test NOTEQUAL -then /msmt/mt-search.cgi%3FIncludeBlogs=1%26search=%s}
And this is the man page:
http://yubnub.org/kernel/man?args=Microsiervos
3 Comments:
Great job Fuska! I hadn't thought of using ifThen in quite that way. I'm glad it was useful for you! :)
Inspired by this technique I created ifEmpty, which is just a simple alias that makes such redirections more convenient.
nice one eliazar - I'll definitely use that one next time.
Post a Comment
<< Home