<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-11223139</atom:id><lastBuildDate>Wed, 20 Aug 2008 15:47:41 +0000</lastBuildDate><title>Software Salariman</title><description/><link>http://kamhungsoh.com/blog/</link><managingEditor>noreply@blogger.com (Kam-Hung Soh)</managingEditor><generator>Blogger</generator><openSearch:totalResults>275</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-934379320231726506</guid><pubDate>Fri, 15 Aug 2008 03:21:00 +0000</pubDate><atom:updated>2008-08-15T13:58:17.689+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Firefox Unexpectedly Popular</title><atom:summary type='text'>Falls in the use of older versions of MSIE are always offset by rises in use of newer versions and some rise in the use for other browsers.  The July 08 browser statistics for W3 Schools show that the use of all versions of MSIE fell 2.0% while use of Firefox rose 1.6% (and Opera gains 0.2%).  Has the use of MSIE7 peaked?  (Insert usual caveats about selective audience of this site, monthly </atom:summary><link>http://kamhungsoh.com/blog/2008/08/firefox-unexpectedly-popular.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-4313999318189088651</guid><pubDate>Tue, 05 Aug 2008 04:10:00 +0000</pubDate><atom:updated>2008-08-05T14:27:52.418+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Software</category><category domain='http://www.blogger.com/atom/ns#'>Annoyances</category><title>Change Default for Show Markup in MS-Word 2003</title><atom:summary type='text'>An annoying feature in Microsoft Word 2003 is that the default setting for the Reviewing toolbar is Final Showing Markup, so that all changes in your documents are highlighted when you open it, even after you accept all changes and saved the document previously.  The solution is to unset your Security option Make hidden markup visible when opening or saving..  See How to turn off annoying MS Word</atom:summary><link>http://kamhungsoh.com/blog/2008/08/change-default-for-show-markup-in-ms.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-6560650653892125886</guid><pubDate>Mon, 04 Aug 2008 09:10:00 +0000</pubDate><atom:updated>2008-08-08T10:16:55.211+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Perl</category><category domain='http://www.blogger.com/atom/ns#'>Database</category><title>List Empty Access Tables using Perl</title><atom:summary type='text'>A port of my Python DBI program to Perl.  Note that you have to install package DBD-ODBC for the ODBC driver.


use warnings;
use strict;
use DBI;

use constant MDB_PATH =&gt; '&lt;path&gt;';

my $dbh = DBI-&gt;connect('DBI:ODBC:DRIVER=Microsoft Access Driver (*.mdb);Dbq=' . MDB_PATH);

my $sth = $dbh-&gt;prepare(
  "SELECT name FROM MSYSOBJECTS WHERE name NOT LIKE 'MSYS%' AND type = 1");
$sth-&gt;execute();
my $</atom:summary><link>http://kamhungsoh.com/blog/2008/08/list-empty-access-tables-using-perl.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-5641148475759538875</guid><pubDate>Fri, 01 Aug 2008 07:12:00 +0000</pubDate><atom:updated>2008-08-04T19:20:04.589+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Database</category><category domain='http://www.blogger.com/atom/ns#'>Python</category><title>List Empty Access Tables using Python</title><atom:summary type='text'>We wanted to find empty tables in a Microsoft Access database.  Below is a Python script that uses the PythonWin odbc module to find empty tables in an MS-Access database.  Edit the required path to your database file by modifying the MDB_PATH variable.

Follow the note at the start of the script to configure your MS-Access database security if you get the following message:  dbi.program-error: [</atom:summary><link>http://kamhungsoh.com/blog/2008/08/list-empty-access-tables-using-python.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-5368611350183650754</guid><pubDate>Sun, 27 Jul 2008 23:39:00 +0000</pubDate><atom:updated>2008-07-29T13:34:36.882+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Perl</category><category domain='http://www.blogger.com/atom/ns#'>Ruby</category><category domain='http://www.blogger.com/atom/ns#'>Gawk</category><category domain='http://www.blogger.com/atom/ns#'>Groovy</category><category domain='http://www.blogger.com/atom/ns#'>Python</category><title>Extract Lines with Line Numbers using Gawk, Groovy, Perl, Python and Ruby</title><atom:summary type='text'>More ways to extract a block of text from a stream and prepend the line number to each line.

Below is the Gawk version.  The built-in variables NR is the number of the current line and $0 is the content of the current line.

gawk "(NR &gt;= r1 &amp;&amp; NR &lt;= r2) {printf("""%4d %s\n""", NR, $0)}"

The Perl and Ruby scripts are exactly the same.  The built-in variable $. holds the number of the current </atom:summary><link>http://kamhungsoh.com/blog/2008/07/extract-lines-with-line-numbers-using.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-1246824418898890081</guid><pubDate>Sun, 27 Jul 2008 08:09:00 +0000</pubDate><atom:updated>2008-07-28T13:59:03.760+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Perl</category><title>Basic Perl Tk HTTP Server Monitor</title><atom:summary type='text'>Here's a port of my simple Python HTTP Server Monitor to Perl, using the Tkx module to interface with Tk.  A minor difference is to use the Tk options database to specify the font of the headers in a configuration file.


# Basic HTTP Server Monitor by Kam-Hung Soh 2008.
use strict;
use warnings;
use Log::Log4perl qw(:easy);
use LWP::Simple;
use Text::CSV;
use POSIX;
use Tkx;

use constant </atom:summary><link>http://kamhungsoh.com/blog/2008/07/basic-perl-tk-http-server-monitor.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-7780902016470672218</guid><pubDate>Sun, 13 Jul 2008 02:02:00 +0000</pubDate><atom:updated>2008-07-27T19:02:29.976+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Python</category><title>Basic Python Tk HTTP Server Monitor</title><atom:summary type='text'> We had some servers which would occasionally go offline, so I wrote a basic HTTP server monitor using Python and Tkinter (the interface to the Tk GUI library):


# HTTP Server Monitor by Kam-Hung Soh 2008
from csv     import reader
from httplib import HTTPConnection
from logging import basicConfig, error, info, INFO
from os.path import exists
from time    import strftime
from tkFont  import Font</atom:summary><link>http://kamhungsoh.com/blog/2008/07/basic-python-tk-http-server-monitor.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-7318847412204727425</guid><pubDate>Fri, 11 Jul 2008 23:06:00 +0000</pubDate><atom:updated>2008-07-13T10:10:29.781+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>PowerShell</category><category domain='http://www.blogger.com/atom/ns#'>Python</category><title>Extract Columns From Tabular Text - Powershell and Python</title><atom:summary type='text'>Finishing off different ways to extract columns, here's the PowerShell and Python versions:

foreach-object { $_.Split('&lt;delimiter&gt;')[-1] }

$_ is the current object (or record) in the loop.  When processing tabular text, $_ is a .Net String class, so we use its Split() method to divide the input on the &lt;delimiter&gt;.  Split() returns a String array, and index -1 refers to the last String (or </atom:summary><link>http://kamhungsoh.com/blog/2008/07/extract-columns-from-tabular-text.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-270148574192379179</guid><pubDate>Fri, 11 Jul 2008 09:52:00 +0000</pubDate><atom:updated>2008-07-13T10:09:16.353+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Perl</category><category domain='http://www.blogger.com/atom/ns#'>Ruby</category><title>Extract Columns From Tabular Text - Perl and Ruby</title><atom:summary type='text'>My previous posting described using the GnuWin cut command to extract columns from tabular text data but you couldn't specify columns relative to the last column.  The cut command is pretty easy to use in a command console, so if you want to overcome this limitation without too additional effort, you could write an ad-hoc script using Perl or Ruby programming languages.

A Perl solution: perl -F </atom:summary><link>http://kamhungsoh.com/blog/2008/07/extract-columns-from-tabular-text-perl.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-3053624072279498754</guid><pubDate>Sat, 05 Jul 2008 03:04:00 +0000</pubDate><atom:updated>2008-07-05T19:46:36.062+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Browser Usage Forecast</title><atom:summary type='text'>W3Schools Browser Statistics page shows that in June 2008, 41% of hits came from developers using Firefox and 53.5% from developers using MSIE7 or MSIE6.

What would the list be like at the end of this year?  IE7 should cross 30%, IE6 to be about 22% and IE5 may disappear from the list.  Unlike IE5, Moz could be barely be on the list because the number of hits is declining slower than IE5.  FF </atom:summary><link>http://kamhungsoh.com/blog/2008/07/browser-usage-forecast.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-39862384214202838</guid><pubDate>Sat, 05 Jul 2008 00:57:00 +0000</pubDate><atom:updated>2008-07-13T10:07:53.333+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>GnuWin</category><title>Extract Columns From Tabular Text - Cut</title><atom:summary type='text'>A quick way to extract one or more columns from tabular or character delimited data, such as Web pages or log files, is to use the GnuWin cut command.

Some examples:


Print just the bug number and title from a list of bugs in a Web page (e.g. from Bugzilla): cut -f1,8.
Print the URLs requested from Apache log (in common format): cut -d" " -f7.


The -f switch specifies the column to extract.  </atom:summary><link>http://kamhungsoh.com/blog/2008/07/extract-columns-from-tabular-text-cut.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-688249092832070887</guid><pubDate>Fri, 27 Jun 2008 01:27:00 +0000</pubDate><atom:updated>2008-06-27T11:34:51.770+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SVG</category><category domain='http://www.blogger.com/atom/ns#'>Internet Explorer</category><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Firefox 3 SVG Performance Improvement</title><atom:summary type='text'>I did a quick check of my SVG Game of Life demonstration with Firefox 3 and found that it ran much faster compared to Adobe's ancient SVG Viewer 3.03 (ASV).  The performance ratio used to be roughly 3:2 in favour of Firefox.  Now, it's close to 5:1!

The raw numbers on the same computer: 24-27 fps on Firefox 3, 5-6 fps for MSIE6 + ASV.</atom:summary><link>http://kamhungsoh.com/blog/2008/06/firefox-3-svg-performance-improvement.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-1523697812121284627</guid><pubDate>Wed, 25 Jun 2008 00:49:00 +0000</pubDate><atom:updated>2008-06-25T11:08:43.155+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Windows</category><title>Event 7000, DS1410D service failed to start</title><atom:summary type='text'>Windows Event Viewer kept reporting error event 7000 each time I restarted my computer:

The DS1410D service failed to start due to the following error: 
The system cannot find the file specified.

The error is caused by Windows trying to load a file called DS1410D.SYS.  This file is part of an application called FlexLM but since I've uninstalled FlexLM, the file has also been deleted.

The fix </atom:summary><link>http://kamhungsoh.com/blog/2008/06/event-7000-ds1410d-service-failed-to.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-894435424984103155</guid><pubDate>Tue, 24 Jun 2008 01:27:00 +0000</pubDate><atom:updated>2008-07-13T10:06:11.746+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>GnuWin</category><title>Gawk Print Last Field</title><atom:summary type='text'>gawk script to print the last field of each line:

gawk -F &lt;delimiter&gt; "{ print $NF }".

-F defines the separator in the command line, otherwise you would prepend "BEGIN { FS=&lt;delimiter&gt; }".

NF is the number of fields in a line and $n is the value of the n'th field, so $NF outputs the last field.

See Also


Perl and Ruby versions
PowerShell and Python versions
Cut command version
</atom:summary><link>http://kamhungsoh.com/blog/2008/06/gawk-print-last-field.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-7868288624065306956</guid><pubDate>Mon, 23 Jun 2008 01:07:00 +0000</pubDate><atom:updated>2008-06-24T14:24:34.700+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Firefox 3 - Second Impressions</title><atom:summary type='text'>Second impressions after using Firefox 3 for a couple of days:


Smart Location Bar pretty much replaces the Search bar in most situations.
Faster than FF2 when rendering of pages with Javascript controls.  Load http://msdn.microsoft.com/en-us/library/aa923541.aspx and select some of the menu links at the top of the page.  In FF3, the menus expand immediately while in FF2, they used to take about</atom:summary><link>http://kamhungsoh.com/blog/2008/06/firefox-3-second-impressions.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-4731187369040085648</guid><pubDate>Sat, 21 Jun 2008 08:40:00 +0000</pubDate><atom:updated>2008-06-21T20:05:27.376+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Firefox 3 on ABC Radio National Breakfast</title><atom:summary type='text'>Firefox 3's release was reported on ABC Radio National Breakfast Tech review with Peter Marks - Firefox.  The ABC doesn't seem to make transcripts of that programme (at least, I couldn't find any), so here's one:

Mark Bannerman: Well increasingly we do business, receive entertainment and socialize through the Internet.  And the way we access the Internet is with a Web browser.  This week, a new </atom:summary><link>http://kamhungsoh.com/blog/2008/06/firefox-3-on-abc-radio-national.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-1124502940663784794</guid><pubDate>Sat, 21 Jun 2008 08:00:00 +0000</pubDate><atom:updated>2008-06-21T18:10:43.726+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Firefox</category><title>Firefox 3 Gmail Problem Fixed</title><atom:summary type='text'>Upgraded from Firefox 2.0.0.14 to Firefox 3.0 and found that I couldn't load the default Gmail client (Firefox displayed the progress bar and then stopped).  Same problem with using the HTTPS URL.  The plain HTML client and older Gmail client was OK.  I worked my way through the Firefox Basic Troubleshooting guide and the problem was fixed only after making a new profile.</atom:summary><link>http://kamhungsoh.com/blog/2008/06/firefox-3-gmail-problem-fixed.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-8699249062820873734</guid><pubDate>Wed, 18 Jun 2008 00:47:00 +0000</pubDate><atom:updated>2008-06-18T10:59:08.561+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Software</category><category domain='http://www.blogger.com/atom/ns#'>Annoyances</category><title>Creating UML Composite States in Sparx Enterprise Architect</title><atom:summary type='text'>How to create a UML composite state element using Sparx Systems' Enterprise Architect application:


In a state machine diagram, create a new state element.
Select the state element's context menu item Advanced / Composite Element.


The selected state element is converted into a composite state element (the image has a infinity symbol) with its own state machine diagram (check the Project </atom:summary><link>http://kamhungsoh.com/blog/2008/06/creating-uml-composite-states-in-sparx.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-7953440081573528062</guid><pubDate>Tue, 10 Jun 2008 09:00:00 +0000</pubDate><atom:updated>2008-06-10T19:00:30.549+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Software</category><category domain='http://www.blogger.com/atom/ns#'>Annoyances</category><title>Visio 2003 Cannot Resize Shape Directly with Keyboard</title><atom:summary type='text'>Microsoft Visio 2003 doesn't provide keyboard shortcut  for the user to resize a shape instance.  You have to use the mouse pointer or (shudder) enter the required height and width of the shape in the Size &amp; Position window.</atom:summary><link>http://kamhungsoh.com/blog/2008/06/visio-2003-cannot-resize-shape-directly.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-3108825149668251645</guid><pubDate>Wed, 04 Jun 2008 00:30:00 +0000</pubDate><atom:updated>2008-06-04T11:15:02.686+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>GnuWin</category><category domain='http://www.blogger.com/atom/ns#'>Windows Cmd</category><title>Match Multiple String Patterns</title><atom:summary type='text'>To find multiple string patterns in an input file or stream, these commands are equivalent:


sed -n -e "/pattern1/p" -e "/pattern2/p".  -n suppresses printing all input lines.
sed -n -r -e "/pattern1|pattern2/p".  -r enables extended regular expressions.
grep -e "pattern1" -e "pattern2"..
grep -E "pattern1|pattern2".  -E enables extended regular expressions.
findstr "pattern1 pattern2".  You </atom:summary><link>http://kamhungsoh.com/blog/2008/06/match-multiple-string-patterns.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-5216797743246286903</guid><pubDate>Mon, 26 May 2008 09:07:00 +0000</pubDate><atom:updated>2008-06-06T13:41:33.365+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Programming</category><category domain='http://www.blogger.com/atom/ns#'>Database</category><title>Pivot Table Hack in Sqlite3 and MySQL</title><atom:summary type='text'>Introduction

A pivot table or cross tabulation is a reporting feature that BAs love to use to summarise transaction data, such as server logs and sales figures.  Spreadsheet programs such as Microsoft Excel or OpenOffice.org Calc have nifty wizards to help you create a pivot table.  You can also create pivot tables in databases.  For example, Microsoft Access has a TRANSFORM … PIVOT SQL </atom:summary><link>http://kamhungsoh.com/blog/2008/05/pivot-table-hack-in-sqlite3.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-8168856498532947298</guid><pubDate>Sat, 24 May 2008 23:05:00 +0000</pubDate><atom:updated>2008-05-25T09:22:42.196+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Windows</category><category domain='http://www.blogger.com/atom/ns#'>Annoyances</category><title>Disable Vista Memory Diagnostic Tool</title><atom:summary type='text'>Vista has a Memory Diagnostic Tool which you can turn on to test your computer's memory when you restart it.  Once it is enabled, this tool starts every time you restart your computer.  Be warned: the Vista help system doesn't explain how to disable it!

After some Web searching, I found this tip:


 - Open command prompt as Admistrator: by typing in start ''cmd'' right click the .exe file and </atom:summary><link>http://kamhungsoh.com/blog/2008/05/disable-vista-memory-diagnostic-tool.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-4622638296407100328</guid><pubDate>Sat, 24 May 2008 02:43:00 +0000</pubDate><atom:updated>2008-05-25T18:03:59.584+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>GnuWin</category><category domain='http://www.blogger.com/atom/ns#'>Windows</category><category domain='http://www.blogger.com/atom/ns#'>Software</category><category domain='http://www.blogger.com/atom/ns#'>Python</category><title>Fix Incorrectly Encoded Unicode Files with Python</title><atom:summary type='text'>The Problem

We had a lot of text files committed into our CVS repository as Unicode format.  When these files were checked out later, we found that they weren't really text files nor Unicode files because CVS had only prepended two bytes to the start of these files, FF FE, but left only one byte for encoding each character.  Some text editors such as Vim could open these files but other </atom:summary><link>http://kamhungsoh.com/blog/2008/05/fix-incorrectly-encoded-unicode-files.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-6822377476328615755</guid><pubDate>Fri, 23 May 2008 03:14:00 +0000</pubDate><atom:updated>2008-05-23T14:42:19.962+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Windows</category><title>MDI Child Window Menu Shortcuts</title><atom:summary type='text'>I accidently moved PythonWin's Interactive window out of sight when I grabbed and dropped it with my mouse pointer.  Restarting PythonWin didn't help because the position of the child window was stored in Windows Registry, so it remained hidden even after restarting PythonWin.  I considered hacking Windows Registry to reset the child window's position, until I found the keyboard shortcuts to move</atom:summary><link>http://kamhungsoh.com/blog/2008/05/mdi-child-window-menu-shortcuts.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-11223139.post-4529937659817915036</guid><pubDate>Tue, 20 May 2008 09:00:00 +0000</pubDate><atom:updated>2008-07-13T10:14:16.884+10:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>GnuWin</category><category domain='http://www.blogger.com/atom/ns#'>Windows Cmd</category><title>GnuWin32 find and missing argument for exec</title><atom:summary type='text'>Reminder on how to use -exec action in GnuWin32 find command in Windows cmd.exe.  For example, if you want to find a string, the format is:

find . -type f -exec grep &lt;pattern&gt; {} ;

If you do any of the following, you can get this cryptic error message: find: missing argument to `-exec'


Put double-quote marks around the command: find . -type f -exec "grep &lt;pattern&gt; {} ;"
Don't leave a space </atom:summary><link>http://kamhungsoh.com/blog/2008/05/gnuwin32-find-and-missing-argument-for.html</link><author>noreply@blogger.com (Kam-Hung Soh)</author></item></channel></rss>