Dec 3, 2007

awk cause NTVDM illegal instruction problem on Windows XP

When I invoke awk directly in windows command box, I was encountered NTVDM Illegal instruction CS:059a IP:01f0 OP:ff ff 00 00 00 problem. There is no such problem if I invoke the awk in bash shell.

After a few googling for this problem, it is very well cleared to be caused by symbolic link of gawk.exe to awk.exe in $cygwin_home/bin folder.

It is ugly that cygwin keep the ".exe" extension to the symbolic link file and make it hidden in the bin folder. Obviously a symbol link cannot be executed in windows command box, why not get rid of the ".exe" extension and make it unhidden.

My solution is remove the ".exe" extension and create an batch file awk.bat which call gawk in turn. The awk.bat file is put in my "_ALIAS" folder which in kept in the %PATH% environment variable.

About Me

My photo