Archive for May, 2008
Shell Scripts with Windows LF’s Fail in Latest Cygwin
by Frank Kim on May.05, 2008, under Cygwin, Perforce
I am not sure when this happened but now in Cygwin shell scripts with Windows LF’s (the infamous control M’s) fail, i.e. Cygwin fails to run them because it will complain about the ‘\r’ character.
The simple way to fix this is to change your scripts to use UNIX LF’s by calling dos2unix or “conv -U”.
If you are using Perforce on Windows and seeing this problem then you can change your client to use “share” for the LineEnd option. Since Perforce stores all its text files in UNIX format on the server then it will write them out locally on your Windows machine in UNIX format. See the Perforce Knowledge Base article, CR/LF Issues and Text Line-endings. Fortunately Windows batch scripts with UNIX LF’s still run properly.
Note that when you make this change from the “local” LineEnd option then text files you already checked out will have the Windows LF’s. You will need to do a p4 sync -f on the files you want updated to have UNIX LF’s. Also when do you a p4 diff on your opened text files it will look like the whole file has changed. Again this is because of line feed issues. Doing a dos2unix on those opened text files will solve the problem.
Color Code Outlook Messages
by Frank Kim on May.05, 2008, under Windows
I am not a big fan of Outlook, I prefer Gmail, but it does have some nice features and in a corporate environment you almost never have another choice.
One of the nice features of Outlook is the ability to color code your messages. For example you can color code the subject line to highlight messages addressed directly to you via:
Tools > Organize > Using Colors > Messages sent only to me now appear [Blue] > Turn On
There are other filters you can turn on by clicking on “Automatic Formatting…” at the top right in the Tools > Organize > Using Colors window.