<?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 Jose Castrillo</title>
    <link>https://jose.castrillo.eu/tags/bash/</link>
    <description>Recent content in Bash on Jose Castrillo</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 14 Jan 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://jose.castrillo.eu/tags/bash/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>🎨 Customize Your Terminal Shell with Oh My Bash</title>
      <link>https://jose.castrillo.eu/post/ohmybash-git/</link>
      <pubDate>Tue, 14 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://jose.castrillo.eu/post/ohmybash-git/</guid>
      <description>Learn how to dynamically switch themes in Oh My Bash based on your environment and directory.</description>
    </item>
    <item>
      <title>👨‍💻 Tunning your Devbox shell</title>
      <link>https://jose.castrillo.eu/post/bash-terminal-devbox/</link>
      <pubDate>Fri, 26 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://jose.castrillo.eu/post/bash-terminal-devbox/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://castrillo.gitlab.io/figaro/sw-sandbox.png&#34; alt=&#34;&#34;  /&gt;
&lt;/p&gt;
&lt;h1 id=&#34;using-oh-my-bash-with-jetify-devbox-a-step-by-step-guide&#34;&gt;Using Oh-My-Bash with Jetify Devbox: A Step-by-Step Guide&lt;/h1&gt;
&lt;p&gt;If you&amp;rsquo;re a developer working with Jetify Devbox, you might have noticed that its shell environment doesn&amp;rsquo;t always play nicely with Oh-My-Bash. By following these steps, you can customize and personalize your themes and PS1 prompt to create a more enjoyable and productive shell experience.&lt;/p&gt;
&lt;h2 id=&#34;step-1-install-oh-my-bash&#34;&gt;Step 1: Install Oh-My-Bash&lt;/h2&gt;
&lt;p&gt;First, you need to install Oh-My-Bash. You can do this by running the following command in your terminal:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a job using crontab</title>
      <link>https://jose.castrillo.eu/post/cron-script-linux/</link>
      <pubDate>Wed, 03 Apr 2019 00:00:00 +0000</pubDate>
      <guid>https://jose.castrillo.eu/post/cron-script-linux/</guid>
      <description>&lt;p&gt;To automate tasks or create some monitoring job we can use the older and efficient tool the &amp;ldquo;CronJob&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;For our example, I&amp;rsquo;ve created a simple script to detect the cache memory and clean it if raise to a condition then send a notification by mail.&lt;/p&gt;
&lt;p&gt;Library used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;exim4 (mail server) or ssmtp (mail server). Both uses the same &amp;ldquo;mail&amp;rdquo; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Script:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# grab the buff/cache memory
mem=&amp;#34;$(free -m | grep &amp;#39;Mem:&amp;#39; | awk &amp;#39;{print $6}&amp;#39;)&amp;#34;

if  (( $mem &amp;gt; 350 ))
then
echo &amp;#39;wooo is more than 250M&amp;#39;
echo 3 | sudo tee /proc/sys/vm/drop_caches
echo &amp;#39;cache dropped&amp;#39;
echo &amp;#34;Memory buff/cache cleaned last value:&amp;#34; $mem | mail -s &amp;#34;cache_memory&amp;#34; target_mail@local.com
else
echo &amp;#39;be cool man, memory lower&amp;#39;
fi
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;script path: /user/Documents/script/memory&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
