<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Shell on Redowan&#39;s Reflections</title>
    <link>https://rednafi.com/tags/shell/</link>
    <description>Recent content in Shell on Redowan&#39;s Reflections</description>
    <image>
      <title>Redowan&#39;s Reflections</title>
      <url>https://blob.rednafi.com/static/images/home/cover.png</url>
      <link>https://rednafi.com/</link>
    </image>
    <generator>Hugo -- 0.160.1</generator>
    <language>en</language>
    <lastBuildDate>Sat, 28 Mar 2026 14:28:41 +0100</lastBuildDate>
    <atom:link href="https://rednafi.com/tags/shell/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Background jobs and inherited file descriptors</title>
      <link>https://rednafi.com/shards/2026/03/background-jobs-inherited-fd/</link>
      <pubDate>Sat, 28 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/shards/2026/03/background-jobs-inherited-fd/</guid>
      <description>Why &amp;amp; backgrounds execution but doesn&amp;#39;t stop output from flooding your terminal.</description>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>Dynamic shell variables</title>
      <link>https://rednafi.com/misc/dynamic-shell-variables/</link>
      <pubDate>Sat, 11 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/dynamic-shell-variables/</guid>
      <description>Learn variable indirection in Bash with ${!var} syntax. Build context-aware configs, function dispatch, and dynamic variable name resolution.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Running only a single instance of a process</title>
      <link>https://rednafi.com/misc/run-single-instance/</link>
      <pubDate>Tue, 31 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/run-single-instance/</guid>
      <description>Prevent multiple script instances with file locking. Use flock in Bash, fcntl in Python, and syscall.Flock in Go for single-instance processes.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>Python</category>
      <category>Go</category>
    </item>
    <item>
      <title>SSH saga</title>
      <link>https://rednafi.com/misc/ssh-saga/</link>
      <pubDate>Tue, 17 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/ssh-saga/</guid>
      <description>Complete SSH setup guide: key pairs, authorized_keys, sshd_config, ssh_config, known_hosts, agent forwarding, and hardening for secure remote access.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>Networking</category>
      <category>Security</category>
    </item>
    <item>
      <title>Discovering direnv</title>
      <link>https://rednafi.com/misc/direnv/</link>
      <pubDate>Wed, 02 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/direnv/</guid>
      <description>Automate environment variables per directory with direnv. Load .envrc files on entry, unload on exit. Integrate with Python venv and uv workflow.</description>
      <category>TIL</category>
      <category>Shell</category>
      <category>Unix</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Bash namerefs for dynamic variable referencing</title>
      <link>https://rednafi.com/misc/bash-namerefs/</link>
      <pubDate>Fri, 20 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/bash-namerefs/</guid>
      <description>Master Bash namerefs with declare -n to create dynamic variable references. Build generic functions for arrays and associative arrays without eval.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Shell redirection syntax soup</title>
      <link>https://rednafi.com/misc/shell-redirection/</link>
      <pubDate>Thu, 12 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/shell-redirection/</guid>
      <description>Complete guide to Bash redirection. Master stdout, stderr, pipes, tee, file descriptors, and shorthand syntax with practical examples for every case.</description>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>HTTP requests via /dev/tcp</title>
      <link>https://rednafi.com/misc/http-requests-via-dev-tcp/</link>
      <pubDate>Thu, 08 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/http-requests-via-dev-tcp/</guid>
      <description>Make raw HTTP requests with Bash&amp;#39;s /dev/tcp file descriptor. Build health check scripts without curl or wget using TCP socket connections.</description>
      <category>TIL</category>
      <category>Shell</category>
      <category>Unix</category>
      <category>Networking</category>
    </item>
    <item>
      <title>The *nix install command</title>
      <link>https://rednafi.com/misc/install/</link>
      <pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/install/</guid>
      <description>Replace mkdir, cp, and chmod with a single install command. Copy files, create directories, and set permissions in one step with GNU coreutils.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Here-doc headache</title>
      <link>https://rednafi.com/misc/heredoc-headache/</link>
      <pubDate>Fri, 19 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/heredoc-headache/</guid>
      <description>Avoid here-doc pitfalls when running remote commands via SSH. Learn variable expansion gotchas and simpler alternatives for deployment scripts.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>DevOps</category>
      <category>GitHub</category>
    </item>
    <item>
      <title>I kind of like rebasing</title>
      <link>https://rednafi.com/misc/on-rebasing/</link>
      <pubDate>Tue, 18 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/on-rebasing/</guid>
      <description>Master git rebase for cleaner commit history. Learn interactive rebasing, squashing commits, and rebasing feature branches onto main with practical examples.</description>
      <category>git</category>
      <category>Shell</category>
      <category>Unix</category>
      <category>GitHub</category>
    </item>
    <item>
      <title>Pesky little scripts</title>
      <link>https://rednafi.com/misc/pesky-little-scripts/</link>
      <pubDate>Sun, 29 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/pesky-little-scripts/</guid>
      <description>Organize custom scripts with comma-prefixed naming. Improve tab completion and eliminate clutter by prefixing script names with special characters.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Dotfile stewardship for the indolent</title>
      <link>https://rednafi.com/misc/dotfile-stewardship-for-the-indolent/</link>
      <pubDate>Wed, 27 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/dotfile-stewardship-for-the-indolent/</guid>
      <description>Manage dotfiles across devices with GNU Stow. Symlink configuration files from git repo to home directory with simple, idempotent commands.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Using DNS record to share text data</title>
      <link>https://rednafi.com/misc/dns-record-to-share-text/</link>
      <pubDate>Mon, 17 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/dns-record-to-share-text/</guid>
      <description>Share data via DNS TXT records using dig and base64 encoding. Learn limitations, security concerns, and practical use cases for DNS tunneling.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>Networking</category>
    </item>
    <item>
      <title>Unix-style pipelining with Python&#39;s subprocess module</title>
      <link>https://rednafi.com/python/unix-style-pipeline-with-subprocess/</link>
      <pubDate>Fri, 14 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/python/unix-style-pipeline-with-subprocess/</guid>
      <description>Build Unix-style command pipelines in Python using subprocess.run with stdout piping for efficient process chaining and output capture.</description>
      <category>Python</category>
      <category>TIL</category>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>Implementing a simple traceroute clone in Python</title>
      <link>https://rednafi.com/python/implement-traceroute/</link>
      <pubDate>Thu, 01 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/python/implement-traceroute/</guid>
      <description>Build a traceroute clone in Python using UDP and ICMP sockets to trace network packet routes and measure hop latency with TTL manipulation.</description>
      <category>Python</category>
      <category>Networking</category>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>Fixed-time job scheduling with UNIX &#39;at&#39; command</title>
      <link>https://rednafi.com/misc/fixed-time-task-scheduling-with-at/</link>
      <pubDate>Sun, 14 May 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/fixed-time-task-scheduling-with-at/</guid>
      <description>Schedule one-time commands with UNIX at command. Learn job queuing, remote scheduling via HTTP API, and managing atd/atrun daemons.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>JavaScript</category>
      <category>Networking</category>
    </item>
    <item>
      <title>Associative arrays in Bash</title>
      <link>https://rednafi.com/misc/associative-arrays-in-bash/</link>
      <pubDate>Wed, 03 May 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/associative-arrays-in-bash/</guid>
      <description>Learn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>Data Structures</category>
    </item>
    <item>
      <title>Process substitution in Bash</title>
      <link>https://rednafi.com/misc/process-substitution-in-bash/</link>
      <pubDate>Sun, 30 Apr 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/process-substitution-in-bash/</guid>
      <description>Use process substitution &amp;lt;() to treat command output as files in Bash. Compare directories, process data, and avoid temporary files with this technique.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
    </item>
    <item>
      <title>Dynamic menu with select statement in Bash</title>
      <link>https://rednafi.com/misc/dynamic-menu-with-select-in-bash/</link>
      <pubDate>Sat, 29 Apr 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/dynamic-menu-with-select-in-bash/</guid>
      <description>Build interactive CLI menus with Bash select statement. Create user-friendly command-line tools with option selection and function dispatch.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Simple terminal text formatting with tput</title>
      <link>https://rednafi.com/misc/terminal-text-formatting-with-tput/</link>
      <pubDate>Sun, 23 Apr 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/terminal-text-formatting-with-tput/</guid>
      <description>Format terminal output with tput instead of ANSI codes. Set colors, bold text, underlines, and backgrounds with simple commands in shell scripts.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Tinkering with Unix domain sockets</title>
      <link>https://rednafi.com/misc/tinkering-with-unix-domain-socket/</link>
      <pubDate>Sat, 11 Mar 2023 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/tinkering-with-unix-domain-socket/</guid>
      <description>Build Unix domain socket servers and clients with Python and socat. Access Docker API via UDS, create HTTP servers, and optimize inter-process communication.</description>
      <category>Python</category>
      <category>Shell</category>
      <category>Unix</category>
      <category>Networking</category>
    </item>
    <item>
      <title>Colon command in shell scripts</title>
      <link>https://rednafi.com/misc/colon-command-in-shell-scripts/</link>
      <pubDate>Fri, 23 Dec 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/colon-command-in-shell-scripts/</guid>
      <description>Use the colon : command as a no-op in Bash scripts for cleaner debug output with -x flag. Alternative to echo for section markers and comments.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Auditing commit messages on GitHub</title>
      <link>https://rednafi.com/misc/audit-commit-messages-on-github/</link>
      <pubDate>Thu, 06 Oct 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/audit-commit-messages-on-github/</guid>
      <description>Automate commit message validation with GitHub Actions. Enforce refs and closes patterns to maintain clean Git history and link commits to issues.</description>
      <category>GitHub</category>
      <category>DevOps</category>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>To quote or not to quote</title>
      <link>https://rednafi.com/misc/to-quote-or-not-to-quote/</link>
      <pubDate>Wed, 05 Oct 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/to-quote-or-not-to-quote/</guid>
      <description>Master shell quoting rules: single vs double quotes, backticks vs $(). Learn when to quote variables to prevent spaces and special characters from breaking commands.</description>
      <category>Shell</category>
      <category>Unix</category>
    </item>
    <item>
      <title>Returning values from a shell function</title>
      <link>https://rednafi.com/misc/return-values-from-a-shell-function/</link>
      <pubDate>Sun, 25 Sep 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/return-values-from-a-shell-function/</guid>
      <description>Understand how return values work in Bash functions. Learn exit codes, status evaluation patterns, and proper boolean returns with true/false commands.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
    </item>
    <item>
      <title>Distil git logs attached to a single file</title>
      <link>https://rednafi.com/misc/distil-git-logs-attached-to-a-file/</link>
      <pubDate>Tue, 21 Jun 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/distil-git-logs-attached-to-a-file/</guid>
      <description>View git commit history for a single file with git log --follow. Learn to track multiple files with xargs and concatenate their commit logs.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>Git</category>
      <category>TIL</category>
    </item>
    <item>
      <title>Health check a server with &#39;nohup $(cmd) &amp;&#39;</title>
      <link>https://rednafi.com/misc/health-check-a-server-with-nohup/</link>
      <pubDate>Mon, 18 Apr 2022 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/health-check-a-server-with-nohup/</guid>
      <description>Run background health checks in CI with nohup and ampersand. Test server readiness with retry loops and automatic cleanup on success or failure.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>DevOps</category>
    </item>
    <item>
      <title>Don&#39;t add extensions to shell executables</title>
      <link>https://rednafi.com/misc/do-not-add-extensions-to-bash-executables/</link>
      <pubDate>Tue, 23 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/do-not-add-extensions-to-bash-executables/</guid>
      <description>Why executable scripts shouldn&amp;#39;t have extensions. Learn GitHub&amp;#39;s scripts-to-rule-them-all pattern for language-agnostic project automation.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
    <item>
      <title>Use &#39;command -v&#39; over &#39;which&#39; to find a program&#39;s executable</title>
      <link>https://rednafi.com/misc/use-command-v-over-which/</link>
      <pubDate>Tue, 16 Nov 2021 00:00:00 +0000</pubDate>
      <guid>https://rednafi.com/misc/use-command-v-over-which/</guid>
      <description>Replace which with command -v for POSIX-compliant executable lookup. Learn why command -v is the portable alternative for finding program paths.</description>
      <category>Shell</category>
      <category>Unix</category>
      <category>TIL</category>
      <category>CLI</category>
    </item>
  </channel>
</rss>

