I do something similar to the OP. When I'm working on a long project with multiple pieces that I might have left incomplete, I'll use a grep-like (like ack, which has PCRE) to quickly look for placeholders or cusswords:<p><pre><code> ack -C -i 'tk|to ?do|lorem|fu.k|shit|wt[fh]|[!?.]{3,}'
</code></pre>
Maybe the OP's goal is to have his phds practice more shell scripting and syntax. But it seems the same effect could be achieved with grep and the flag to filter from a file of patterns, rather than creating an unwieldy single string to enumerate all the possible words. Instead of having to write if/else logic to provide a lackluster CLI, have students create a repo of weasel words and use git clone/curl with grep.<p>I didn't read through his third script for detecting duplicate words, but couldn't it be achieved by using PCRE regex and backreferences?<p><a href="http://stackoverflow.com/questions/2823016/regular-expression-for-consecutive-duplicate-words" rel="nofollow">http://stackoverflow.com/questions/2823016/regular-expressio...</a><p>Off-topic, but I've been meaning to write a post on how learning the command-line made me a significantly more productive writer. I do most of my writing on sites built from static site generators, such as Jekyll and Middleman and Sphinx. For many of my tutorials, I have to describe graphical elements which require taking screenshots.<p>I of course know the OSX keyboard shortcut to turn on the screen grab utility and interactively make a selection. But this saves the screenshot to a default location with a generic file name. To include that image in my blog, I have to move it over to my working directory, rename it, and then write the img code and src attribute to my blog post. It's enough annoying small steps that including images in my posts was a huge chore.<p>Sometime ago, this blog post on OS X Terminal Utilities [0] made it to HN's front page and I learned that screencapture could be invoked from the Terminal. So I wrote a little Ruby wrapper that, when invoked from the command-line with an argument for output path, would call screencapture after a 2-second delay -- enough time for me to Cmd-Tab from a Terminal to the application I want to screensnap -- and then save the snap to the specified destination and output HTML/Markdown that I could paste into my blogpost.<p>Sample usage:<p><pre><code> $ screenpy images/path/to/screenshot.jpg
</code></pre>
stderr:<p><pre><code> Writing to: images/path/to/screenshot.jpg
Format: jpeg
quality: 75
optimize: True

</code></pre>
stdout:<p><pre><code> <img src="images/path/to/screenshot.jpg" alt="screenshot.jpg">
</code></pre>
I've iterated the tool, converting it to Python and including the was-sdk so I could upload to S3 if I need an absolute URL. And I've written plenty of other utilities since...but it's hard to overstate how much being able to operate via CLI has smoothed my writing experience. It's not just that it saves me time, but I'll write visual-heavy posts that I would have never even tried, especially back in my Wordpress days.<p>[0] <a href="http://www.mitchchn.me/2014/os-x-terminal/" rel="nofollow">http://www.mitchchn.me/2014/os-x-terminal/</a><p>[1] <a href="https://gist.github.com/dannguyen/bfb45408d43986eefdf83b59bc9e8629" rel="nofollow">https://gist.github.com/dannguyen/bfb45408d43986eefdf83b59bc...</a>