<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Command-Line on Bill Glover</title>
		<link>https://old.bill.dev/tags/command-line/</link>
		<description>Recent content in Command-Line on Bill Glover</description>
		<generator>Hugo</generator>
		<language>en-gb</language>
		
			<managingEditor>hello@bill.dev (Bill)</managingEditor>
		
		
			<webMaster>hello@bill.dev (Bill)</webMaster>
		
		
		
			<lastBuildDate>Sun, 22 Sep 2024 19:05:36 +0100</lastBuildDate>
		
			<atom:link href="https://old.bill.dev/tags/command-line/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>How to upgrade Ubuntu on Digital Ocean</title>
				<link>https://old.bill.dev/notes/upgrade-ubuntu-on-do/</link>
				<pubDate>Fri, 02 Sep 2022 21:32:13 +0100</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/upgrade-ubuntu-on-do/</guid>
				<description>&lt;h1 id=&#34;how-to-upgrade-ubuntu-on-digital-ocean&#34;&gt;How to upgrade Ubuntu on Digital Ocean&lt;/h1&gt;&#xA;&lt;p&gt;When canonical release a new version of Ubuntu, you are prompted to run this command to upgrade.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;-release-upgrade&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Running this command on a Digital Ocean droplet will give you the following warning.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;Some third party entries in your sources.list were disabled. You can re-enable them after the upgrade with the &amp;lsquo;software-properties&amp;rsquo; tool or your package manager.&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;You can continue the upgrade but it will fail and roll-back to the previous version. The error you are given includes the following phrase.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Update Trivy Database in Harbor</title>
				<link>https://old.bill.dev/notes/harbor-trivy-db-update/</link>
				<pubDate>Thu, 19 May 2022 14:56:00 +0000</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/harbor-trivy-db-update/</guid>
				<description>&lt;p&gt;I recently deployed Harbor and Trivy with automatic updating disabled. I hadn&amp;rsquo;t realise that this would prevent images from being scanned at all and so needed to trigger a manual update. This note describes how to manually trigger an update to the Trviy database in Harbor deployed on top of VMware Tanzu Kubernetes Grid.&lt;/p&gt;&#xA;&lt;h3 id=&#34;demo&#34;&gt;Demo&lt;/h3&gt;&#xA;&lt;div id=&#34;trivy-db-update&#34;&gt;&lt;/div&gt;&#xA;&lt;script&gt;&#xA;    AsciinemaPlayer.create(&#xA;        &#39;trivy-db-update.cast&#39;,&#xA;        document.getElementById(&#39;trivy-db-update&#39;),&#xA;        {&#xA;            cols:100,&#xA;            rows:24,&#xA;            autoPlay:false,&#xA;            preload:false,&#xA;            loop:false,&#xA;            speed:2,&#xA;            idleTimeLimit:2,&#xA;            theme:&#34;asciinema&#34;&#xA;        }&#xA;        );&#xA;&lt;/script&gt;&#xA;&lt;h3 id=&#34;instructions&#34;&gt;Instructions&lt;/h3&gt;&#xA;&lt;p&gt;Switch context to the cluster where you have deployed Harbor.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Writing multi-line strings into a text file in bash script</title>
				<link>https://old.bill.dev/notes/write-multiline-strings-in-bash-script/</link>
				<pubDate>Thu, 24 Mar 2022 22:36:19 +0000</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/write-multiline-strings-in-bash-script/</guid>
				<description>&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt; I wanted to use a shell script to write multi-line strings into a text file. I didn&amp;rsquo;t want parameters or commands to be substituted in the text being written.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; You need to quote the limit string when specifying your here-document.&lt;/p&gt;&#xA;&lt;h3 id=&#34;references&#34;&gt;References&lt;/h3&gt;&#xA;&lt;p&gt;My fist discovery was that the pattern for doing this in a shell script was called a &amp;ldquo;Here Document&amp;rdquo;. I don&amp;rsquo;t think I have ever looked up the &lt;code&gt;bash&lt;/code&gt; manual before. But this is where I found the solution.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Replace Environment Variables in a File</title>
				<link>https://old.bill.dev/notes/replace-environment-variables-in-a-file/</link>
				<pubDate>Mon, 21 Mar 2022 20:17:59 +0000</pubDate><author>hello@bill.dev (Bill)</author>
				<guid>https://old.bill.dev/notes/replace-environment-variables-in-a-file/</guid>
				<description>&lt;p&gt;Every now and again you stumble across a command that solves a problem you didn&amp;rsquo;t realise you had. Recently, I discovered &lt;code&gt;envsubst&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;Substitutes the values of environment variables.&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I&amp;rsquo;ve found myself substituting environment variables in configuration files increasingly often (see: Kubernetes). On more than one occasion I&amp;rsquo;ve tied myself in knots trying to do this with scripts. It turns out that &lt;code&gt;envsubst&lt;/code&gt; does most of what I need.&lt;/p&gt;&#xA;&lt;p&gt;Take the following file, example.yaml:&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
