October 14th, 2009

When you want to pass a parameter on the command line, don't forget to pass the parameter on the command line

This happens to me, too. I once got so distracted by the process of purchasing some tickets in person, choosing the performance date and the seats, fumbling for my credit card, signing the receipt, and when I was done, I left the ticket booth without my tickets!

Here is a question that came in from a customer. The details have been changed but the underlying point is the same.

According to the documentation, the taglog command prints a history log of all the tags in the system. I can pass the -d option to limit the date range, and that works too. It also says that that I can pass a specific tag name to limit the listing to just that one tag, but I can’t get that part to work. Here’s what I’m doing:

for /f %i in (taglist.txt) do taglog -d 2008/05/01,2008/05/31 >> output

But this just dumps the history of all tags during the month of May, not the tags I asked for.

This customer got so excited about passing the date range filter that he forgot to pass the tag name.

for /f %i in (taglist.txt) do taglog -d 2008/05/01,2008/05/31 %i >> output
Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.