<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>System Admin on BoochTek, LLC</title><link>https://blog.boochtek.com/categories/system-admin/</link><description>Recent content in System Admin on BoochTek, LLC</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 11 Mar 2014 23:28:22 +0000</lastBuildDate><atom:link href="https://blog.boochtek.com/categories/system-admin/index.xml" rel="self" type="application/rss+xml"/><item><title>Burying the Lede</title><link>https://blog.boochtek.com/posts/readable-shell-scripts/</link><pubDate>Tue, 11 Mar 2014 23:28:22 +0000</pubDate><guid>https://blog.boochtek.com/posts/readable-shell-scripts/</guid><description>&lt;p&gt;Most of us don&amp;rsquo;t write very readable shell scripts. There are plenty of things we could do better, but today I want to talk about one in particular &amp;mdash; burying the lede.&lt;/p&gt;
&lt;p&gt;The term &amp;ldquo;burying the lede&amp;rdquo; comes from the field of journalism. Here&amp;rsquo;s the &lt;a href="http://en.wiktionary.org/wiki/bury_the_lede"&gt;Wiktionary definition&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To begin a story with details of secondary importance to the reader while postponing more essential points or facts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Like a good news article, code should tell a story. And the story should start with what&amp;rsquo;s most important. In the case of code, the most important information is the high-level functionality &amp;mdash; a succinct summary of what the program does. In other words, write (and organize) the code top-down, as opposed to bottom-up.&lt;/p&gt;</description></item><item><title>Yak Shaving #1: Cursor Keys</title><link>https://blog.boochtek.com/posts/yak-shaving-cursor-keys/</link><pubDate>Mon, 03 Mar 2014 22:02:59 +0000</pubDate><guid>https://blog.boochtek.com/posts/yak-shaving-cursor-keys/</guid><description>&lt;p&gt;I recently decided to start using Emacs again. I used it extensively from the early 1990s until the early 2000s. I pretty much stopped using it when I had a sysadmin job with no Emacs on the servers, and no ability to install it. With the rising popularity of tmux and tmate for remote pairing, and my dislike for vim&amp;rsquo;s modes, I decided to try going back to Emacs in the terminal.&lt;/p&gt;</description></item><item><title>What I Want in a Blog Engine</title><link>https://blog.boochtek.com/posts/blogging-software/</link><pubDate>Sun, 02 Feb 2014 22:50:43 +0000</pubDate><guid>https://blog.boochtek.com/posts/blogging-software/</guid><description>&lt;p&gt;I&amp;rsquo;m considering moving away from &lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt;, for a couple reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security. There have been several vulnerabilities over the past few years, and I&amp;rsquo;ve never really had a high level of confidence that it&amp;rsquo;s secure. In addition, I now find the whole PHP model &amp;mdash; every web app running as a single user, instead of leveraging UNIX permissions &amp;mdash; to be broken.&lt;/li&gt;
&lt;li&gt;Speed. I started to realize a couple years ago that a blog engine should generate static pages. The static pages should be updated whenever new content is added. There&amp;rsquo;s really no reason to re-generate the page every time someone wants to read it. At the very least, Server-Side Includes (&lt;a href="https://en.wikipedia.org/wiki/Server_Side_Includes"&gt;SSI&lt;/a&gt;) or Edge-Side Includes (&lt;a href="https://en.wikipedia.org/wiki/Edge_Side_Includes"&gt;ESI&lt;/a&gt;) should be used.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that I&amp;rsquo;m starting to actually blog consistently, it makes sense to change. But before I move to something different, I want to be sure that I find all the features that I need. This post is my thought process about what I want.&lt;/p&gt;</description></item><item><title>Bulk Rename in Bash</title><link>https://blog.boochtek.com/posts/bulk-rename-in-bash/</link><pubDate>Fri, 26 Aug 2011 22:53:58 +0000</pubDate><guid>https://blog.boochtek.com/posts/bulk-rename-in-bash/</guid><description>&lt;p&gt;Here&amp;rsquo;s a relatively simple way to rename a bunch of files from the command line. It uses &lt;code&gt;sed&lt;/code&gt; within a command substitution to compute the new names from the old names.&lt;/p&gt;
&lt;p&gt;In this example, we&amp;rsquo;re renaming files that start with &amp;ldquo;ABC&amp;rdquo; to start with &amp;ldquo;XYZ&amp;rdquo; instead:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; i in ABC*; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt; mv $i &lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;echo $i | sed -e s/^ABC/XYZ/&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You&amp;rsquo;ll have to use shell globbing (wildcards) in the first part, to determine which files will be the source of the renaming, and regular expressions in the second part to translate the old names into the new names.&lt;/p&gt;</description></item></channel></rss>