<?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 Khizer Rehan</title><link>https://khizerrehandev.com/tags/bash/</link><description>Recent content in Bash on Khizer Rehan</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 12 Jul 2026 16:59:46 +0500</lastBuildDate><atom:link href="https://khizerrehandev.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>Why my exports didn't persist after running a shell script</title><link>https://khizerrehandev.com/posts/til/source-vs-export/</link><pubDate>Sun, 12 Jul 2026 16:59:46 +0500</pubDate><guid>https://khizerrehandev.com/posts/til/source-vs-export/</guid><description>&lt;h1 id="why-my-exports-didnt-persist-after-running-a-shell-script"&gt;
 Why my exports didn&amp;rsquo;t persist after running a shell script
 &lt;a class="heading-link" href="#why-my-exports-didnt-persist-after-running-a-shell-script"&gt;
 &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;
 &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;
 &lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;I ran into this while writing a small setup script. I&amp;rsquo;d set a variable inside it, run the script, and then &lt;code&gt;echo&lt;/code&gt; it in my terminal only to get nothing back. Empty. Every time.&lt;/p&gt;
&lt;p&gt;Took me a while to realize &lt;code&gt;source&lt;/code&gt; and &lt;code&gt;export&lt;/code&gt; are two different things solving two different problems. Once that clicked, the whole thing made sense.&lt;/p&gt;</description></item></channel></rss>