<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Bash on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/bash/</link>
    <description>Recent content in Bash on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 27 Jan 2025 16:28:35 +0100</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/bash/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Work with LLMs on the command line</title>
      <link>https://janikvonrotz.ch/2025/01/27/work-with-llms-on-the-command-line/</link>
      <pubDate>Mon, 27 Jan 2025 16:28:35 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2025/01/27/work-with-llms-on-the-command-line/</guid>
      <description>&lt;p&gt;I used VSCodium and Codeium to develop Python code. VSCode is my editor of choice and Codeium is a well integrated AI-tool that helps writing code. While it solved a lot of problems for me, especially writing boilerplate code, I became more and more frustrated using this setup.&lt;/p&gt;&#xA;&lt;p&gt;No longer I wanted to understand the actual problem or piece of code, but just to prompt out a solution. Often I was eagerly waiting for the auto-complete feature to fix my code. I copied pieces of code to LLM chats in the browser and then updated the code in the editor. This workflow didn&amp;rsquo;t feel right. This isn&amp;rsquo;t coding.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZSH scripts with dynamic command completion</title>
      <link>https://janikvonrotz.ch/2021/08/26/zsh-scripts-with-dynamic-command-completion/</link>
      <pubDate>Thu, 26 Aug 2021 09:43:28 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2021/08/26/zsh-scripts-with-dynamic-command-completion/</guid>
      <description>&lt;p&gt;ZSH/Bash completion guides sure are confusing. I personally had difficulties wrapping my head around those arbitrary &lt;code&gt;compdef, _describe, _arguments, compadd&lt;/code&gt;  commands. Moreover, in my case I wanted to complete a script that is placed in multiple folders and should load completion arguments dynamically. Luckily I found a simple solution.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Parse URL in shell script</title>
      <link>https://janikvonrotz.ch/2021/03/09/parse-url-in-shell-script/</link>
      <pubDate>Tue, 09 Mar 2021 16:06:27 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2021/03/09/parse-url-in-shell-script/</guid>
      <description>&lt;p&gt;Use the bash script below to extract any segment of an URL. For example you can use it like this &lt;code&gt;parse-url https://www.example.com subdomain,proto&lt;/code&gt;  and get the subdomain and protocol of the url as reponse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Simple task runner with bash/zsh scripts</title>
      <link>https://janikvonrotz.ch/2020/09/23/simple-task-runner-with-bash-zsh-scripts/</link>
      <pubDate>Wed, 23 Sep 2020 12:03:24 +0200</pubDate>
      <guid>https://janikvonrotz.ch/2020/09/23/simple-task-runner-with-bash-zsh-scripts/</guid>
      <description>&lt;p&gt;When you work on multiple projects with different tech (Docker, npm, python, ..), a common interface to build, start, install or clean the state of the project is a powerful tool. There are various task runners for this job, however, every one of them requires you to install at least one dependency and so must everybody else who wants to use the project. What if we can use a task runner that is preinstalled on every computer? What about bash/zsh?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bash SSH host auto completion</title>
      <link>https://janikvonrotz.ch/2019/02/21/bash-ssh-host-auto-completion/</link>
      <pubDate>Thu, 21 Feb 2019 10:59:37 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2019/02/21/bash-ssh-host-auto-completion/</guid>
      <description>&lt;p&gt;By default the ssh command does not support auto completion for host names. However, it stores all hosts you have accessed in the &lt;code&gt;~/.ssh/known_hosts&lt;/code&gt; file. We can take this data and use it for an auto completion function.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Find certificate files that will expire soon and create a csr</title>
      <link>https://janikvonrotz.ch/2018/11/29/find-certificate-files-that-will-expire-soon-and-create-a-csr/</link>
      <pubDate>Thu, 29 Nov 2018 13:44:51 +0100</pubDate>
      <guid>https://janikvonrotz.ch/2018/11/29/find-certificate-files-that-will-expire-soon-and-create-a-csr/</guid>
      <description>&lt;p&gt;The certificate expiration period should be kept as short as possible in a public key infrastructure. But the cost of resigning certificates must not be too high. This trade off causes a lot of problems. Every now and then a certificate expires without anybody noticing it or the same certificate is used for 10 years, which is obviously a security risk. In order to avoid this problem you either use &lt;a href=&#34;https://letsencrypt.org/&#34;&gt;Let’s Encrypt&lt;/a&gt; or another fully automated certificate management system. If this is not available you must know at least which certificates are going to expire soon.&lt;/p&gt;</description>
    </item>
    <item>
      <title>bin/bash^M: bad interpreter</title>
      <link>https://janikvonrotz.ch/2013/08/14/binbashm-bad-interpreter/</link>
      <pubDate>Wed, 14 Aug 2013 08:00:19 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2013/08/14/binbashm-bad-interpreter/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re using windows and linux/unix and your also a system administrator who likes to script. The chances are high that you&amp;rsquo;ll get this error when executing a script on a linux/unix machine that has been made on a windows machine: &lt;code&gt;bin/bash^M: bad interpreter: No such file or directoy&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;^M&lt;/code&gt; character is a windows line break, which linux/unix can&amp;rsquo;t interpret. The solution is easy, use &lt;code&gt;dos2unix [filename]&lt;/code&gt; and everything should work fine.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
