<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scripting &#8211; Andromedabay Store</title>
	<atom:link href="https://andromedabay.ddns.net/category/my-topics/programming/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>https://andromedabay.ddns.net</link>
	<description>Your source of Technical Insight and Interesting Stuff</description>
	<lastBuildDate>Thu, 02 Oct 2025 03:51:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://andromedabay.ddns.net/wp-content/uploads/2015/08/cropped-myicon-32x32.png</url>
	<title>Scripting &#8211; Andromedabay Store</title>
	<link>https://andromedabay.ddns.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Docker Container for Jupyter-Notebook</title>
		<link>https://andromedabay.ddns.net/docker-container-for-jupyter-notebook/</link>
					<comments>https://andromedabay.ddns.net/docker-container-for-jupyter-notebook/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Tue, 30 Sep 2025 20:13:13 +0000</pubDate>
				<category><![CDATA[Computed Mathematics]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[ArchLinux]]></category>
		<category><![CDATA[Containerfile]]></category>
		<category><![CDATA[Dockerfile]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[Jupyter-notebook]]></category>
		<category><![CDATA[numpy]]></category>
		<category><![CDATA[Octave]]></category>
		<category><![CDATA[SageMath]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=2955</guid>

					<description><![CDATA[I have created a Docker/Podman Container Image with Jupyter Notebook installed on it. Please feel free to use it for your Python, Statistics, Numpy, GNU-Octave]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>2 Minute, 38 Second                </div>

            </div><p>I have created a Docker/Podman Container Image with Jupyter Notebook installed on it. Please feel free to use it for your Python, Statistics, Numpy, GNU-Octave and SageMath work.</p>
<p>Github Source &#8211; Containerfile<br />
Pre-Build Container on Docker Hub<br />
Pre-Build Container on Quay.io<br />
Installing Podman on Windows 11<br />
Launching the Docker/Podman Container<br />
Using Jupyter-Notebook<br />
Good Video Series on SageMath<br />
References<br />
Final Thoughts &amp; Feedback</p>
<h2>GitHub Source – Containerfile</h2>
<p>The Containerfile used to build this image is available on GitHub. It includes all necessary instructions to set up a lightweight environment with Jupyter Notebook and essential scientific computing tools. You can inspect, modify, or rebuild the image to suit your needs.<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://github.com/hammadrauf/jupyter-notebook" target="_blank" rel="noopener">GitHub Repository &#8211; https://github.com/hammadrauf/jupyter-notebook</a></p>
<h2>Pre-Built Container on Docker Hub</h2>
<p>To save time, you can pull the pre-built image directly from Docker Hub. It’s ready to run and includes Python, Numpy, GNU-Octave, and SageMath pre-installed.</p>
<p>Visit the Docker Hub page for more details and tags: <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://hub.docker.com/r/hammadrauf/jupyter-notebook" target="_blank" rel="noopener">Docker Hub</a></p>
<h2>Pre-Built Container on Quay.io</h2>
<p>For those who prefer Quay.io, the same image is available there as well. It’s maintained in sync with the Docker Hub version.</p>
<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://quay.io/repository/hammadrauf/jupyter-notebook" target="_blank" rel="noopener">Quay.io Repository</a></p>
<h2>Installing Podman on Windows 11</h2>
<p><a href="https://podman.io/docs/installation" target="_blank" rel="noopener">Podman</a> is a great alternative to Docker, especially for rootless containers. On Windows 11, you can install Podman via the &#8216;Winget&#8217; or manually using the installer from the official site.<br />
1. Download Podman from <a href="https://podman.io/" target="_blank" rel="noopener">podman.io</a><br />
2. Follow the <a href="https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md" target="_blank" rel="noopener">installation instructions for Windows</a>.</p>
<p>OR use Winget</p>
<pre class="EnlighterJSRAW" data-enlighter-language="powershell">C:\&gt; winget install redhat.podman</pre>
<p>3. Start the podman machine, as per instruction given above.</p>
<h2>Launching the Docker/Podman Container</h2>
<p>Once Podman or Docker is installed, launching the container is simple:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="powershell">C:\&gt; podman run -d -p 8888:8888 -v &lt;local-notebooks-dir&gt;:/workspace/notebooks docker.io/hammadrauf/jupyter-notebook
C:\&gt; podman run -d -p 8888:8888 -v C://Users//XXX//jupyter-notebooks:/workspace/notebooks docker.io/hammadrauf/jupyter-notebook</pre>
<p>Or with Docker:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="powershell">C:\&gt; docker run -d -p 8888:8888 -v &lt;local-notebooks-dir&gt;:/workspace/notebooks docker.io/hammadrauf/jupyter-notebook
C:\&gt; docker run -d -p 8888:8888 -v C://Users//XXX//jupyter-notebooks:/workspace/notebooks docker.io/hammadrauf/jupyter-notebook</pre>
<p>After launching, open your browser and navigate to to access Jupyter Notebook. It should be visible at <a href="http://127.0.0.1:8888" target="_blank" rel="noopener">http://127.0.0.1:8888</a> or <a href="http://localhost:8888" target="_blank" rel="noopener">http://localhost:8888</a> .</p>
<h2>Using Jupyter Notebook</h2>
<p>Inside the container, Jupyter Notebook provides access to multiple kernels:<br />
• Python for general scripting and data analysis<br />
• GNU-Octave for MATLAB-like syntax and numerical mathematics<br />
• SageMath for MAPLE like advanced symbolic mathematics<br />
You can create notebooks for each tool and switch kernels as needed.</p>
<h2>Good Video Series on SageMath</h2>
<p>If you&#8217;re new to SageMath or want to deepen your understanding, check out this excellent video series:<br />
<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4fa.png" alt="📺" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="https://www.youtube.com/watch?v=4QZwb_0OOxY&amp;list=PLyqSpQzTE6M-4YsNKnIOJeR0PVUfy8qoQ&amp;index=18" target="_blank" rel="noopener">SageMath Tutorial Series on YouTube</a><br />
It covers everything from basic algebra to symbolic computation and calculus.</p>
<h2>References</h2>
<p>• Jupyter Project<br />
• SageMath Official Site<br />
• GNU Octave<br />
• Podman Documentation<br />
• Docker Documentation</p>
<h2>Final Thoughts &amp; Feedback</h2>
<p>This container is a great starting point for students, educators, and researchers working in scientific computing. Feel free to fork the GitHub repo, contribute, or share feedback!</p>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Docker%20Container%20for%20Jupyter-Notebook&#038;url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/'); "  href="https://twitter.com/intent/tweet?text=Docker%20Container%20for%20Jupyter-Notebook&#038;url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Docker%20Container%20for%20Jupyter-Notebook&#038;url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Docker%20Container%20for%20Jupyter-Notebook&#038;url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Docker Container for Jupyter-Notebook http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/&#038;caption=Docker%20Container%20for%20Jupyter-Notebook'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/docker-container-for-jupyter-notebook/&#038;caption=Docker%20Container%20for%20Jupyter-Notebook" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/docker-container-for-jupyter-notebook/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Experiments with IaC &#8211; WebNode</title>
		<link>https://andromedabay.ddns.net/experiments-with-iac-automation/</link>
					<comments>https://andromedabay.ddns.net/experiments-with-iac-automation/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Fri, 19 Apr 2024 02:23:57 +0000</pubDate>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[Cost Effective Website]]></category>
		<category><![CDATA[Dovecot]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Email Server]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[IT Infrastructure Systems]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MariaDB/MySQL]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Ansible]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[IaC]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Terraform]]></category>
		<category><![CDATA[Vagrant]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=2844</guid>

					<description><![CDATA[&#8220;WebNode&#8221; is a IaC script to quickly build and deploy a PHP WordPress WebServer and Email Relay Host on a virtualized server and possibly copied]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>6 Minute, 11 Second                </div>

            </div><p>&#8220;WebNode&#8221; is a IaC script to quickly build and deploy a PHP WordPress WebServer and Email Relay Host on a virtualized server and possibly copied over to an actual Physical Hard Disk. It is a work in progress&#8230;as I write these lines.</p>
<h3>IaC</h3>
<p>&#8216;Infrastructure as Code&#8217; or IaC is the process of managing and deploying System infrastructure on virtualized environments. In simple words it is a fancy name given to creating and editing Virtual Machines (and system services) using scripts and code.</p>
<p>IaC has some benefits and some limitations. Benefits include the fact that all this code can be saved in repositories and replayed automatically when needed. One limitation is that if some physical work is involved, that can not be expressed as code.</p>
<p>I started on my Ansible journey impressed by the work done by Jeff Geerling in Ansible (A system for automating repititive tasks as code) and also his Video Series on teaching Ansible. I forked his Packer-boxes Github repository to provide some latest Vagrant images for VirtualBox. Then learning from his Ansible videos, book, and other Ansible books, I am creating another Github repository that will create VirtualBox (and Cloud &#8211; Linode.com, Azure etc.) image named WebNode. WebNode will be a server that has Apache, MariaDB, PHP3, WordPress, and Postfix/Dovecot Email Relay software installed on it. Plus you will be able to bring your own WordPress Database into this node. It is still a work in progress.</p>
<h3>Usefulness of Generic CI/CD System</h3>
<p>CI/CD stands for Continuous Integration/Continuous Delivery. It refers to the concept of automating integration of minor developmental changes automatically into the bigger system along with automated testing. It also provides this successfully tested overall system ready for deployment to the end user, automatically deploying also if configured like so.</p>
<p>Terraform by itself is not a complete CI/CD tool. Any large scale deployment of Terraform/Ansible/Vagrant can not undermine the usefulness of generic CI/CD tools like Jenkins. Jenkins can provide the missing glue in your automated pipeline.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<h3 class="zeroclipboard-container">Using the WebNode Project</h3>
<p><em><strong>Note about Platform</strong>:</em> The instructions given here have been tested on host Ubuntu 22.04 and Windows 11 (with WSL2). The same instructions , with little or no modifications, should also work on MacOS. The virtual machine image can be based on Debian or RHEL based Operating systems.</p>
<p>Make sure you have Git Version control software installed on your computer. Clone the Git project from <a href="https://github.com/build-boxes/webnode.git" target="_blank" rel="noopener">https://github.com/build-boxes/webnode.git</a></p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">git clone https://github.com/build-boxes/webnode.git
cd webnode
</pre>
</div>
<div class="markdown-heading" dir="auto">
<h5 class="heading-element" dir="auto" tabindex="-1">Local Images Creation &#8211; On VirtualBox</h5>
</div>
<p dir="auto">It can be used in Windows 10/11 (a bit difficult to setup), or you can use Debian/Ubuntu host environemnt.</p>
<ol dir="auto">
<li>Install VirtualBox</li>
<li>Install Vagrant, Ansible (Use Windows Subsystem for Linux 2)</li>
<li>Install some plugins in WSL2 to allow Ansible and Vagrant to access Windows VirtualBox (Google Search, <a href="https://slavid.github.io/2021/11/28/running-vagrant-ansible-windows-through-wsl2/#configuration" target="_blank" rel="noopener">related link</a>).</li>
<li>Change into the project root folder.</li>
<li>Download required roles with the following command:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>rm -rf ~/.ansible/roles/</code><code>
ansible-galaxy install --force -r ./roles/requirements.yml </code></pre>
</div>
</li>
<li>Run:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>vagrant up
OR
vagrant up debian</code></pre>
</div>
</li>
<li>Now you can ssh into your Virtual server.
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>vagrant ssh
</code></pre>
</div>
</li>
<li>Get the Local Network IP Address.
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>ip a
</code></pre>
</div>
</li>
<li style="list-style-type: none;"></li>
<li>Open the IP Address in Browser.
<p><figure id="attachment_2868" aria-describedby="caption-attachment-2868" style="width: 1013px" class="wp-caption aligncenter"><a href="https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1.png"><img fetchpriority="high" decoding="async" class="wp-image-2868 size-full" src="https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1.png" alt="WebNode default apache page" width="1013" height="737" srcset="https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1.png 1013w, https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1-600x437.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1-300x218.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2024/05/WebNode-default-apache-page-2-1-768x559.png 768w" sizes="(max-width: 1013px) 100vw, 1013px" /></a><figcaption id="caption-attachment-2868" class="wp-caption-text">WebNode default apache page</figcaption></figure></li>
<li>There is not much to see or test in the WebNode project itself, at this time, other than the page in previuos step. It is a work in progress. Follow the Github repository listed above for uptodate status.</li>
<li>To shutdown the VM, run:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>vagrant halt
OR
vagrant halt debian</code></pre>
</div>
</li>
<li>To Destroy the VM,  run:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>vagrant destroy -f
OR
vagrant destroy debian -f</code></pre>
</div>
</li>
</ol>
<div class="markdown-heading" dir="auto">
<h5 class="heading-element" dir="auto" tabindex="-1">Cloud Image Creation &#8211; On Linode, Azure, AWS or GCP</h5>
</div>
<p dir="auto">It can be used in Windows 10/11 (a bit difficult to setup), or you can use Debian/Ubuntu host environment.</p>
<ol>
<li dir="auto">Install Ansible, Terraform (Use Windows Subsystem for Linux 2)</li>
<li dir="auto">Install some plugins in WSL2 for Ansible (Google Search, <a href="https://slavid.github.io/2021/11/28/running-vagrant-ansible-windows-through-wsl2/#configuration" target="_blank" rel="noopener">related link</a>)</li>
<li dir="auto">Change into the project root folder.</li>
<li dir="auto">Download required roles with the following command:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>rm -rf ~/.ansible/roles/
ansible-galaxy install --force -r ./roles/requirements.yml</code></pre>
</div>
</li>
<li dir="auto">Change into one of the&#8221;tf-linode*&#8221; or &#8220;tf-azure*&#8221; subfolders</li>
<li dir="auto">Run:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>terraform init
terraform plan
terraform apply -auto-approve</code></pre>
</div>
</li>
<li dir="auto">To Destroy run:
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>terraform destroy -auto-approve</code></pre>
</div>
</li>
</ol>
<h3>Using the VirtualBox Images</h3>
<p dir="auto">Apart for use in the WebNode project above, the VirtualBox images can be used for other tasks also. Make sure Vagrant and Oracle VirtualBox are installed. Start by obtaing the Vagrantfile automatically as follows:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">$ vargrant init raufhammad/centos9

OR

C:\&gt; vargrant init raufhammad/centos9</pre>
<p>This will show output like below:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">C:\Users\XYZ&gt;mkdir temp

C:\Users\XYZ&gt;cd temp

C:\Users\XYZ\temp&gt;vagrant init raufhammad/centos9
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

</pre>
<p dir="auto">Once the Vagrantfile is downloaded, you may modify this file as per your needs, before the next step.</p>
<p dir="auto">From the same box directory, run the following command after the Vagrantfile has been downloaded:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>$ vagrant up
</code></pre>
<div class="zeroclipboard-container">Test that the box works correctly, then tear it down with:</div>
</div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>$ vagrant destroy -f
</code></pre>
<h3>Addition of Ansible-Roles</h3>
<div>At the time of this update (May 11, 2024), two ansible-roles have replaced many of the Playbook steps. Reference to the project page of these ansible-roles is given below. The README.md page of these projects provides clues on how to use these re-usable Automation components in other projects.</div>
</div>
<h3>References</h3>
<ol>
<li>The WebNode project repository (Work in progress&#8230;), <a href="https://github.com/build-boxes/webnode" target="_blank" rel="noopener">https://github.com/build-boxes/webnode</a> , Date Accessed: April 18, 2024</li>
<li>Jeff Geerlings original Packer-Boxes Github Repository, <a href="https://github.com/geerlingguy/packer-boxes" target="_blank" rel="noopener">https://github.com/geerlingguy/packer-boxes</a> , Date Accessed: April 18, 2024</li>
<li>My fork from the above with updated Packer-Boxes, <a href="https://github.com/build-boxes/packer-boxes" target="_blank" rel="noopener">https://github.com/build-boxes/packer-boxes</a> , Date Accessed: April 18, 2024</li>
<li>Ready built VagrantUp.com (Vagrant boxes) repository, <a href="https://app.vagrantup.com/raufhammad">https://app.vagrantup.com/raufhammad</a> , Date Accessed: April 18, 2024</li>
<li>Install Oracle VirtualBox Link, <a href="https://www.virtualbox.org/wiki/Downloads" target="_blank" rel="noopener">https://www.virtualbox.org/wiki/Downloads</a> , Date Accessed: April 18, 2024</li>
<li>Install Vagrant link (Install in wsl2 in Windows) , <a href="https://developer.hashicorp.com/vagrant/install" target="_blank" rel="noopener">https://developer.hashicorp.com/vagrant/install</a> , Date Accessed: April 18, 2024</li>
<li>Install Terraform link, <a href="https://developer.hashicorp.com/terraform/install" target="_blank" rel="noopener">https://developer.hashicorp.com/terraform/install</a> , Date Accessed: April 18, 2024</li>
<li>Install Ansible guide link, <a href="https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html" target="_blank" rel="noopener">https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html</a> , Date Accessed: April 18, 2024</li>
<li>Install Ansible in WSL2, <a href="https://4sysops.com/archives/install-ansible-on-windows/" target="_blank" rel="noopener">https://4sysops.com/archives/install-ansible-on-windows/</a> , Date Accessed: April 18, 2024</li>
<li>Using Windows VirtualBox from Ansible in WSL2 &#8211; Tricks, <a href="https://slavid.github.io/2021/11/28/running-vagrant-ansible-windows-through-wsl2/#configuration" target="_blank" rel="noopener">https://slavid.github.io/2021/11/28/running-vagrant-ansible-windows-through-wsl2/#configuration</a> , Date Accessed: April 18, 2024</li>
<li>Book &#8211; Ansible: Up and Running (3rd Edition), Bas Meijer, Lorin Hochstein, and Rene Moser, Published by O&#8217;Reilly Media Inc, July 2022. Website: <a href="https://www.oreilly.com/library/view/ansible-up-and/9781098109141/" target="_blank" rel="noopener">https://www.oreilly.com/library/view/ansible-up-and/9781098109141/</a>, <a href="https://www.ansiblebook.com/" target="_blank" rel="noopener">https://www.ansiblebook.com/</a></li>
<li>Jeff Geerling (GeerlingGuy) Ansible Video Series, <a href="https://www.youtube.com/playlist?list=PL2_OBreMn7FqZkvMYt6ATmgC0KAGGJNAN" target="_blank" rel="noopener">https://www.youtube.com/playlist?list=PL2_OBreMn7FqZkvMYt6ATmgC0KAGGJNAN</a> , Date Accessed: April 18, 2024</li>
<li>Custom Ansible Roles:
<ul>
<li><a href="https://www.redhat.com/en/topics/automation/what-is-an-ansible-role" target="_blank" rel="noopener">What are Ansible-Roles?</a> Date Accessed: May 11, 2024</li>
<li>hammadrauf.sudousers &#8211; <a href="https://github.com/hammadrauf/sudousers/tree/main" target="_blank" rel="noopener">https://github.com/hammadrauf/sudousers/tree/main</a> &#8211; Date Accessed: May 11, 2024</li>
<li>hammadrauf.apache2 &#8211; <a href="https://github.com/hammadrauf/apache2">https://github.com/hammadrauf/apache2</a> &#8211; Date Accessed: May 11, 2024
<ol>
<li>hammadrauf.apache_vhosts &#8211; <a href="https://github.com/hammadrauf/apache_vhosts" target="_blank" rel="noopener">https://github.com/hammadrauf/apache_vhosts</a></li>
</ol>
</li>
</ul>
</li>
<li>Jenkins Tutorial, <a href="https://www.jenkins.io/doc/tutorials/" target="_blank" rel="noopener">https://www.jenkins.io/doc/tutorials/</a>, Date Accessed: July 12, 2024</li>
</ol>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/experiments-with-iac-automation/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/experiments-with-iac-automation/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Experiments%20with%20IaC%20&#8211;%20WebNode&#038;url=http://andromedabay.ddns.net/experiments-with-iac-automation/'); "  href="https://twitter.com/intent/tweet?text=Experiments%20with%20IaC%20&#8211;%20WebNode&#038;url=http://andromedabay.ddns.net/experiments-with-iac-automation/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Experiments%20with%20IaC%20&#8211;%20WebNode&#038;url=http://andromedabay.ddns.net/experiments-with-iac-automation/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Experiments%20with%20IaC%20&#8211;%20WebNode&#038;url=http://andromedabay.ddns.net/experiments-with-iac-automation/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Experiments with IaC &#8211; WebNode http://andromedabay.ddns.net/experiments-with-iac-automation/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/experiments-with-iac-automation/&#038;caption=Experiments%20with%20IaC%20&#8211;%20WebNode'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/experiments-with-iac-automation/&#038;caption=Experiments%20with%20IaC%20&#8211;%20WebNode" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/experiments-with-iac-automation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Number to Words in Java</title>
		<link>https://andromedabay.ddns.net/number-to-words-in-java/</link>
					<comments>https://andromedabay.ddns.net/number-to-words-in-java/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Fri, 29 Mar 2024 02:09:03 +0000</pubDate>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[JasperReports]]></category>
		<category><![CDATA[Jaspersoft]]></category>
		<category><![CDATA[java]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=2827</guid>

					<description><![CDATA[This is related to an old post. This time I have translated it from C/C++ to Java and modified it a little bit. Now it]]></description>
			<script>console.log("CSV DATA (RAW):", `<br />
Parameters for NumberToWords (in Java),#colspan#,#colspan#<br />
1 &nbsp;,Name,Number<br />
#rowspan#,Data-Type,BigDecimal<br />
#rowspan#,Description,The Double or Float numeric value which needs to be converted into words.<br />
2 &nbsp;,Name,currencyNote<br />
#rowspan#,Data-Type,String<br />
#rowspan#,Description,The currency name that will appear in the output for the whole number part.<br />
3 &nbsp;,Name,currencyCoin<br />
#rowspan#,Data-Type,String<br />
#rowspan#,Description,The currency coin name that will appear in the output for the fractional number part.<br />
4 &nbsp;,Name,coinPlaces<br />
#rowspan#,Data-Type,Integer<br />
#rowspan#,Description,Number of digits in the coin output. For example for Dollar and Cents it should be 2. For some currency like Bahraini Dinar and Fills it will be 3.<br />`);</script><script>console.log("processed data:", {"1":null,"0":{"value":"Parameters for NumberToWords (in Java)","colspan":2,"rowspan":1},"2":{"value":"#colspan#<br \/>","colspan":1,"rowspan":1}});</script>							<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>1 Minute, 41 Second                </div>

            </div><p>This is related to an <a href="https://andromedabay.ddns.net/number-to-words-recursive/" target="_blank" rel="noopener">old post</a>. This time I have translated it from C/C++ to Java and modified it a little bit. Now it takes as input additional parameters of currency-Note, currency-Coin and coin-Places. It is open sourced under Apache Software license 2.0. Source code can be found on <a href="https://github.com/hexword-ca/NumberToWords" target="_blank" rel="noopener">Github</a>.</p>
<p>Number-to-Words-in-Java is a program that takes as input a number and outputs the same number in English words form. It will be useful in situations like Bank Cheque printing. I was able to embed it in a Jaspersoft Studio Report, as shown in screen shots below.</p>
<h2>Parameters Explained</h2>
<p>    <style>
    /* Scoped styles for this table instance */
    #data-table-6a271d7c09c74 thead th {
        background-color: #d3bb33ff !important;
        color: #fff;
    }
    #data-table-6a271d7c09c74 tbody tr:nth-child(even) {
        background-color: #f2f2f2;
    }
    #data-table-6a271d7c09c74 tbody tr:nth-child(odd) {
        background-color: #ffffff;
    }
    #data-table-6a271d7c09c74 th:first-child,
    #data-table-6a271d7c09c74 td:first-child {
        background-color: #f9f9f9;
    }
    </style>
    <div id="table-container">
        <table id="data-table-6a271d7c09c74" class="data-table">
            <thead>
                                <tr>
                                                                                                                    <th colspan="2">Parameters for NumberToWords (in Java)</th>
                                                                                                <th>#colspan#<br /></th>
                                                            </tr>
                            </thead>
            <tbody>
                                    <tr>
                                                                                    <td rowspan="3">1  </td>
                                                                                                                <td>Name</td>
                                                                                                                <td>Number<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Data-Type</td>
                                                                                                                <td>BigDecimal<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Description</td>
                                                                                                                <td>The Double or Float numeric value which needs to be converted into words.<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                    <td rowspan="3">2  </td>
                                                                                                                <td>Name</td>
                                                                                                                <td>currencyNote<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Data-Type</td>
                                                                                                                <td>String<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Description</td>
                                                                                                                <td>The currency name that will appear in the output for the whole number part.<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                    <td rowspan="3">3  </td>
                                                                                                                <td>Name</td>
                                                                                                                <td>currencyCoin<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Data-Type</td>
                                                                                                                <td>String<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Description</td>
                                                                                                                <td>The currency coin name that will appear in the output for the fractional number part.<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                    <td rowspan="3">4  </td>
                                                                                                                <td>Name</td>
                                                                                                                <td>coinPlaces<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Data-Type</td>
                                                                                                                <td>Integer<br /></td>
                                                                        </tr>
                                    <tr>
                                                                                                                                        <td>Description</td>
                                                                                                                <td>Number of digits in the coin output. For example for Dollar and Cents it should be 2. For some currency like Bahraini Dinar and Fills it will be 3.<br /></td>
                                                                        </tr>
                            </tbody>
        </table>
    </div>
    <br />
&nbsp;</p>
<h2>In use inside &#8211; Jaspersoft Studio Report</h2>
<figure id="attachment_2862" aria-describedby="caption-attachment-2862" style="width: 640px" class="wp-caption aligncenter"><a href="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview.png"><img decoding="async" class="size-large wp-image-2862" src="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-1024x551.png" alt="Number To Words (Java) In use inside Jaspersoft Studio - 01 - Report Preview" width="640" height="344" srcset="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-1024x551.png 1024w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-600x323.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-300x161.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-768x413.png 768w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview-1536x826.png 1536w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-01-ReportPreview.png 1921w" sizes="(max-width: 640px) 100vw, 640px" /></a><figcaption id="caption-attachment-2862" class="wp-caption-text">Number To Words (Java) In use inside Jaspersoft Studio &#8211; 01 &#8211; Report Preview</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_2863" aria-describedby="caption-attachment-2863" style="width: 640px" class="wp-caption aligncenter"><a href="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView.png"><img decoding="async" class="size-large wp-image-2863" src="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-1024x551.png" alt="Number To Words (Java) In use inside Jaspersoft Studio -02- Code View" width="640" height="344" srcset="https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-1024x551.png 1024w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-600x323.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-300x161.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-768x413.png 768w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView-1536x826.png 1536w, https://andromedabay.ddns.net/wp-content/uploads/2024/03/NumbToWordsJava-In-use-inside-Jaspersoft-Studio-02-CodeView.png 1921w" sizes="(max-width: 640px) 100vw, 640px" /></a><figcaption id="caption-attachment-2863" class="wp-caption-text">Number To Words (Java) In use inside Jaspersoft Studio -02- Code View</figcaption></figure>
<h2>References</h2>
<ol>
<li>The old post for C/C++ Function, <a href="https://andromedabay.ddns.net/number-to-words-recursive/" target="_blank" rel="noopener">https://andromedabay.ddns.net/number-to-words-recursive/</a>, Date Accessed: March 28, 2024</li>
<li>The old C/C++ Function, <a href="http://codepad.org/C29M1wUQ" target="_blank" rel="noopener">http://codepad.org/C29M1wUQ</a>, Date Accessed: March 28, 2024</li>
<li>Github repository for this (Java) Method, <a href="https://github.com/hexword-ca/NumberToWords" target="_blank" rel="noopener">https://github.com/hexword-ca/NumberToWords</a>, Date Accessed: March 28, 2024</li>
</ol>
<p>&nbsp;</p>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/number-to-words-in-java/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/number-to-words-in-java/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Number%20to%20Words%20in%20Java&#038;url=http://andromedabay.ddns.net/number-to-words-in-java/'); "  href="https://twitter.com/intent/tweet?text=Number%20to%20Words%20in%20Java&#038;url=http://andromedabay.ddns.net/number-to-words-in-java/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Number%20to%20Words%20in%20Java&#038;url=http://andromedabay.ddns.net/number-to-words-in-java/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Number%20to%20Words%20in%20Java&#038;url=http://andromedabay.ddns.net/number-to-words-in-java/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Number to Words in Java http://andromedabay.ddns.net/number-to-words-in-java/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/number-to-words-in-java/&#038;caption=Number%20to%20Words%20in%20Java'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/number-to-words-in-java/&#038;caption=Number%20to%20Words%20in%20Java" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/number-to-words-in-java/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Keeping &#8216;N&#8217; Latest Files in a Folder</title>
		<link>https://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/</link>
					<comments>https://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Sat, 14 Aug 2021 19:38:18 +0000</pubDate>
				<category><![CDATA[BASH Shell]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[|]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[PIPE]]></category>
		<category><![CDATA[Roll over]]></category>
		<category><![CDATA[tail]]></category>
		<category><![CDATA[wc]]></category>
		<category><![CDATA[Windows subsystem for Linux]]></category>
		<category><![CDATA[xargs]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=887</guid>

					<description><![CDATA[In BASH shell (Linux operating system or Windows 10 [See below] ) when you are running a server of some kind often you are faced]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>3 Minute, 50 Second                </div>

            </div>
<p class="wp-block-paragraph">In BASH shell (Linux operating system or Windows 10 <a href="#Windows10">[See below]</a> ) when you are running a server of some kind often you are faced with a situation where the log folder gets filled up with old copies of the log files. Some Server software provide tools for automatic removal of old log files, but at other times you may not be that lucky. I recently faced a similar situation but after some Web-searching and experimentation came up with a solution using a single line Bash Command. If your software does not have automatic roll over capability for log files, then probably you can put the following script in your cron-jobs or Task Scheduler.</p>



<p class="wp-block-paragraph">The basic command is given below:</p>



<pre class="wp-block-code"><code>ls -t | tail -$( expr `ls -t | wc -l` - 4 ) | xargs rm -Rf
# The above command will keep 4 latest files, N = 4</code></pre>



<p class="wp-block-paragraph">Let us break it down in parts and study it for a while.</p>



<h2 class="wp-block-heading"><code>ls -t</code></h2>



<p class="wp-block-paragraph">This command lists out the file names in a folder by order of modified date, the newest files are shown first, then older files.</p>



<h2 class="wp-block-heading"><code>ls -t | wc -l</code></h2>



<p class="wp-block-paragraph">The &#8216;|&#8217; character is the PIPE symbol, it passes output from the command on the left to the command on the right. The command on the right word-count with -l option, which counts the number of lines. So in all this command will count the number of files in the directory.</p>



<h2 class="wp-block-heading"><code>$( expr `ls -t | wc -l` - 4 )</code></h2>



<p class="wp-block-paragraph">The &#8216;$&#8217; symbol has multiple uses. In this case it is being used to evaluate an expression (Expression as in arithmetic). Infact there are 2 expressions here. The inner Expression is marked by the BASH-keyword &#8216;expr&#8217; and enclosed in back-tics characters (`). The inner expression is calculating the total number of files in the directory. The outer Expression is subtracting N (N=4 in our example). So the outer expression is calculating 4 less than the total number of files in the directory.</p>



<h2 class="wp-block-heading"><code>tail -$( expr `ls -t | wc -l` - 4 )</code></h2>



<p class="wp-block-paragraph">The tail command is often used as the right hand side in a PIPE command. Tail command displays the last part of a file or stream. The above tail command is actually &#8220;tail -X&#8221; where X can be any integer. It will show the last X lines of the File or input stream. So in our expression it will show the last part of the file or input stream, leaving aside the top 4 (N) latest files.</p>



<h2 class="wp-block-heading"><code>ls -t | tail -$( expr `ls -t | wc -l` - 4 )</code></h2>



<p class="wp-block-paragraph">The above command now makes more sense, as the Input Stream or file list is now included. &#8220;ls -t&#8221; on the left side of the | (PIPE) symbol is trying to list all files but then the right side of the Pipe  &#8220;tail -$( expr <code>ls -t | wc -l</code> &#8211; 4 )&#8221; is only tailing the last so many files, leaving the top 4 latest files. So this command is generating the list of files we want to delete, in the next step.</p>



<h2 class="wp-block-heading"><code>ls -t | tail -$( expr `ls -t | wc -l` - 4 ) | xargs rm -Rf</code></h2>



<p class="wp-block-paragraph">Now since we can list the names of the files we want to delete, let us PIPE in another command to delete them. &#8220;xargs rm -Rf&#8221; is doing exactly that. The actual delete files command is &#8220;rm -Rf&#8221;, which deletes all files forcing the delete with recursive options. &#8220;xargs&#8221; is a way in BASH shell to pass arguments to commands via a PIPE.</p>



<h2 class="wp-block-heading">Changing Directories Before and After the Command</h2>



<p class="wp-block-paragraph">The command above can be modified to Change into a target directory, then delete all but 4 latest files, and then change back into home folder. The following command does exactly that.</p>



<pre class="wp-block-code"><code>cd /home/hammad/test &amp;&amp; ls -t | tail -$( expr `ls -t | wc -l` - 4 ) | xargs rm -Rf &amp;&amp; cd ~</code></pre>



<h2 class="wp-block-heading" id="Windows10">How to Run it in Windows 10?</h2>



<p class="wp-block-paragraph">If you have enabled and installed &#8220;Windows Subsystem for Linux&#8221; then you can run the above and many other BASH commands in Windows 10 also. A good reference article link is given <a href="https://helpdeskgeek.com/windows-10/how-to-use-linux-bash-shell-on-windows-10/" title="https://helpdeskgeek.com/windows-10/how-to-use-linux-bash-shell-on-windows-10/">here</a> and below in Further Reading section. Another link given in further reading section,  <a style="font-size: revert;" href="https://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/" target="_blank" rel="noreferrer noopener" title="Article 3 Link">Article 3 Link</a><span style="font-size: revert; color: initial;">,</span>  shows how to access Windows folders from Linux Sub-system in Windows 10.</p>



<figure class="wp-block-image size-full foobar"><img loading="lazy" decoding="async" width="1062" height="626" src="https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux.png" alt="Screen shot of Bash commands in Windows 10 Sub system for Linux" class="wp-image-888" srcset="https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux.png 1062w, https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux-600x354.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux-300x177.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux-1024x604.png 1024w, https://andromedabay.ddns.net/wp-content/uploads/2021/08/Screenshot-of-BASH-commands-in-Windows-10-Subsystem-for-Linux-768x453.png 768w" sizes="auto, (max-width: 1062px) 100vw, 1062px" /><figcaption><strong>Screen shot of Bash commands in Windows 10 Sub system for Linux</strong></figcaption></figure>



<h2 class="wp-block-heading">Further Reading</h2>



<ol class="wp-block-list"><li>How to Use Linux Bash Shell on Windows 10. <a href="https://helpdeskgeek.com/windows-10/how-to-use-linux-bash-shell-on-windows-10/" target="_blank" rel="noreferrer noopener" title="Article 1 Link">Article 1 Link</a>, Date accessed August 14, 2021.</li><li>WC Command Examples to Count Number of Lines&#8230;.. , <a href="https://www.tecmint.com/wc-command-examples/" target="_blank" rel="noreferrer noopener" title="Article 2 Link">Article 2 Link</a>, Date accessed August 14, 2021.</li><li>Access Windows files from Linux subsystem, <a href="https://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/" target="_blank" rel="noreferrer noopener" title="Article 3 Link">Article 3 Link</a>, Date accesses August 14, 2021.</li></ol>



<p class="wp-block-paragraph"></p>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder&#038;url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/'); "  href="https://twitter.com/intent/tweet?text=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder&#038;url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder&#038;url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder&#038;url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Keeping &#8216;N&#8217; Latest Files in a Folder http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/&#038;caption=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/&#038;caption=Keeping%20&#8216;N&#8217;%20Latest%20Files%20in%20a%20Folder" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/keeping-n-latest-files-in-a-folder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: andromedabay.ddns.net @ 2026-06-08 15:52:28 by W3 Total Cache
-->