Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 2001

Quick Web Searches from the Command Line

RSS
Subscribe to Windows IT Pro | See More Desktop Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Editor's Note: Share your Windows 2000 and Windows NT discoveries, comments, problems, solutions, and experiences with products and reach out to other Windows 2000 Magazine readers (including Microsoft). Email your contributions (400 words or less) to r2r@win2000mag.com. Please include your phone number. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100. Submissions and listings are available online at http://www.win2000mag.com/articles. Enter the InstantDoc ID number in the InstantDoc ID text box.

In Reader to Reader: "Whois on NT" (May 2001), Bill York provided a simple solution to address Windows NT's lack of a decent Whois command. To work around having to log on to a UNIX shell account or navigate through Network Solutions' Web site just to run a Whois command on your domain, he suggested that you type the following command into Notepad and save the file as whois.cmd:

@echo off

start http://www.netsol.com/cgi-bin/whois/whois?STRING=%1^&SearchType=do^&STRING2.x=14^&STRING2.y=11

This whois.cmd file lets you type

whois 

at a command line and automatically go to a Web page that provides the Whois command's statistics.

You can use the same technique to easily perform most repetitive searches from the command line. At least, you could if the command processor didn't directly parse symbols commonly used in HTTP addresses. The three common characters that cause problems are the ampersand (&), percent sign (%), and dollar sign ($). To work around this problem, you can insert a caret (^) in front of the special characters.

For example, if you go to the Windows 2000 Magazine Web site and search for Minasi, you end up at http://search.win2000mag.net/windows/query.html?col=windows&qt=Minasi. To use the workaround to search, first create the .cmd file. Simply open Notepad and type start followed by a copy of the previous URL. Replace the & with ^& and replace Minasi with %1 so that the modified command line is

start http://search.win2000mag.net/windows/query.html?col=windows^&qt=%1

Save this file (e.g., I saved it as w2kfind.cmd). Then, you can quickly check the Windows 2000 Magazine Web site for any one-word term simply by typing

w2kfind <searchterm>

at a command prompt.

End of Article



Reader Comments
As shown ine, the actual search term argument was left off the last line.
So, to search for "Minasi" articles, you would type:
w2kfind Minasi

Should be obvious.

Alex Angelopoulos September 26, 2001


Updated Whois (this will wrap):
start http://www.netsol.com/cgi-bin/whois/whois?STRING=%1^&SearchType=do^&STRING2.x=14^&STRING2.y=11

This may go stale if they do any further modificiatins to their site.

Alex Angelopoulos October 01, 2001


Since XP has a built-in command-line whois, it would probably be a good idea to suggest a different name for the script to prevent "name collisions" - possibly "whoisx.cmd" since the returned information is "eXtended" beyond the standard "whois" query data.

Alex Angelpoulos October 24, 2001


<br><br>
Whois Update<br>
In Reader to Reader: "Quick Web Searches from the Command Line" (October 2001), Alex K. Angelopoulos refers to Bill York's whois.cmd file, which solves the problem of Windows NT's lack of a Whois command. Network Solutions has merged with VeriSign, and the whois.cmd file that the article includes is now obsolete. Can you provide an update?<br><br>
Gary Stadter<br><br>

Network Solutions has a new domain name and search syntax. Here's a version of whois.cmd that works now, but be aware that this version might become outdated if the company makes other modifications to the site: <br><br>
start http://www.netsol
.com/cgi-bin/whois/whois?
STRING=%1^&SearchType=do^&STRING2.x=14^&STRING2.y=11<br>

Gary Stadter January 18, 2002


<br><br>
Windows XP has a built-in Whois command, so if you use the updated script (which returns "extended" Whois query data), give it a different name (e.g., whoisx.cmd) to prevent name collisions.<br><br>
Alex K. Angelopoulos<br>

Alex K. Angelopoulos January 18, 2002


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

10 Reasons Not to Deploy Windows Vista

The decision to upgrade to Vista has to make business sense, but many companies find the costs in training and application compatibility problems outweigh any benefits Vista brings. ...

10 Reasons to Deploy Windows Vista

The decision to upgrade your XP systems to Vista is simple when you consider features such as easier backup, a great desktop search, and vastly improved security options. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing