Windows command line text processing with Javascript
Or, technically, with JScript.
Update: don’t bother with CScript. See Javascript from the command line to learn about doing this with Rhino; you can also do it with node.js.
Or, technically, with JScript.
Update: don’t bother with CScript. See Javascript from the command line to learn about doing this with Rhino; you can also do it with node.js.
Use less paper, carry around less paper.
I recently wanted to print a 184-page spec to read, but I didn’t want to carry around a pile of paper that big. I have no access to a two-sided printer, but I figured out how to create two-sided pages with a one-side printer:
For free, with ImageMagick.
And OpenOffice Calc.
A co-worker recently told me that she needed to create a flowchart but didn’t have Visio. She knew that I had it, but I played dumb. I told her how I’d recently learned to make simple flowcharts in PowerPoint, and recommended that she try that, but she needed more of a swimlane diagram, which would have been difficult in PowerPoint.
In the U.S., at least.
And an Xubuntu equivalent.
I use the Windows command line a lot, but some things are easier with the graphical interface, such as deleting or moving a group of files that don’t have some obvious part of their name in common. I’ve know for years that you can start up Windows Explorer from the command line, and you can pass it an argument telling it which directory/folder to open in that window. The following command is a simple way to open up an explorer window for the current directory from the command line:
With a very brief XSLT stylesheet.
A colleague recently asked about converting a collection of XML documents to the US-ASCII encoding (that is, to documents where everything is either a US ASCII character or a numeric character reference such as é for the é character). I have several utility stylesheets for converting the encoding of XML documents, and a slight change to one of them gave me a new version that would create a US-ASCII version of any XML document:
Or to RTF, or to whatever.
I’ve written before about using OpenOffice to convert Microsoft Office files to OpenOffice files (and hence XML) with a shell prompt command that starts up OpenOffice with the MS Office file, does a Save As, and then quits OpenOffice. Because it can be done from the command line, this makes conversion of multiple files with a batch file or shell script much easier.