<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>011.04.Loops and Iterations/ - EmbLogic</title>
      <link>https://www.emblogic.com/forum/categories/04-loops-and-iterations-/feed.rss</link>
      <pubDate>Sun, 07 Jun 26 20:04:40 +0530</pubDate>
         <description>011.04.Loops and Iterations/ - EmbLogic</description>
   <language>en-CA</language>
   <atom:link href="/forum/discussions/feed.rss" rel="self" type="application/rss+xml" />
		<item>
			<title>Loops and Iterations. Issues, queries, suggestions or discussion</title>
			<link>https://www.emblogic.com/forum/discussion/1800/loops-and-iterations-issues-queries-suggestions-or-discussion</link>
			<pubDate>Mon, 01 Jul 2024 08:35:48 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1800@/forum/discussions</guid>
			<description><![CDATA[<span><span>Issues, queries, suggestions or discussion related to&nbsp;</span></span><div><span><span style="font-family: Georgia; color: #666666; font-size: large;"><b>04.Loops and Iterations</b></span><br /></span><div><span>should be posted here.</span></div></div>]]></description>
		</item>
		<item>
			<title>19. Complex Script: Process Logs and Summarize Errors</title>
			<link>https://www.emblogic.com/forum/discussion/1802/19-complex-script-process-logs-and-summarize-errors</link>
			<pubDate>Thu, 04 Jul 2024 04:40:22 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1802@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>19</strong></span><span><strong>. </strong></span><span><strong>Complex Script: Process Logs and Summarize Errors</strong></span></span></span></span></h3><div><span><span><span>Write a complex Bash script that processes multiple log files in a directory. The script should:</span></span></span></div><div><span><span><span><span>→</span> Iterate through each log file.</span></span></span></div><div><span><span><span><span>→</span> Read each line.</span></span></span></div><div><span><span><span><span>→</span> Count and summarize the number of errors in each file.</span></span></span></div><div><span><span><span><span>→</span> Write a summary report to `summary_report.txt`.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>18. Break and Continue in Nested Loops</title>
			<link>https://www.emblogic.com/forum/discussion/1803/18-break-and-continue-in-nested-loops</link>
			<pubDate>Thu, 04 Jul 2024 04:40:34 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1803@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>18</strong></span><span><strong>.</strong></span> <span><strong>Break and Continue in Nested Loops</strong></span></span></span></span></h3><div><span><span><span>Write a script with nested `for` loops that skips printing the current iteration when the inner loop counter is equal to 3 and breaks out of the outer loop when the outer loop counter is equal to 4.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>17. Nested While Loop: Process Matrix</title>
			<link>https://www.emblogic.com/forum/discussion/1804/17-nested-while-loop-process-matrix</link>
			<pubDate>Thu, 04 Jul 2024 04:40:53 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1804@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>17.</strong></span> <span><strong>Nested While Loop: Process Matrix</strong></span></span></span></span></h3><div><span><span><span>Create a Bash script using nested `while` loops to iterate through a 2D array (matrix) and print each element along with its row and column indices.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>16. Check Prime Numbers in a Range</title>
			<link>https://www.emblogic.com/forum/discussion/1805/16-check-prime-numbers-in-a-range</link>
			<pubDate>Thu, 04 Jul 2024 04:41:05 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1805@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>16</strong></span><span><strong>.</strong></span> <span><strong>Check Prime Numbers in a Range</strong></span></span></span></span></h3><div><span><span><span>Write a script using a `for` loop to check and print prime numbers between 1 and 50.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>15. Sum of Even Numbers Using While Loop</title>
			<link>https://www.emblogic.com/forum/discussion/1806/15-sum-of-even-numbers-using-while-loop</link>
			<pubDate>Thu, 04 Jul 2024 04:41:16 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1806@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>15</strong></span><span><strong>.</strong></span> <span><strong>Sum of Even Numbers Using While Loop</strong></span></span></span></span></h3><div><span><span><span>Create a script that calculates the sum of even numbers from 1 to 100 using a `while` loop.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>14. Processing Multiple Files</title>
			<link>https://www.emblogic.com/forum/discussion/1807/14-processing-multiple-files</link>
			<pubDate>Thu, 04 Jul 2024 04:41:27 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1807@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>14.</strong></span> <span><strong>Processing Multiple Files</strong></span></span></span></span></h3><div><span><span><span>Write a Bash script that iterates through all `.txt` files in a directory, reads each file line by line, and prints the content.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>13. Using Continue in Loops</title>
			<link>https://www.emblogic.com/forum/discussion/1808/13-using-continue-in-loops</link>
			<pubDate>Thu, 04 Jul 2024 04:41:38 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1808@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>13</strong></span><span><strong>.</strong></span> <span><strong>Using Continue in Loops</strong></span></span></span></span></h3><div><span><span><span>Create a script that uses a `for` loop to iterate through numbers from 1 to 10 but skips the number 5.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>12. Using Break in Loops</title>
			<link>https://www.emblogic.com/forum/discussion/1809/12-using-break-in-loops</link>
			<pubDate>Thu, 04 Jul 2024 04:41:54 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1809@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>12</strong></span><span><strong>.</strong></span> <span><strong>Using Break in Loops</strong></span></span></span></span></h3><div><span><span><span>Write a script that uses a `for` loop to iterate through numbers from 1 to 10 but exits the loop when the number is equal to 5.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>11. Redirect Output to a File</title>
			<link>https://www.emblogic.com/forum/discussion/1810/11-redirect-output-to-a-file</link>
			<pubDate>Thu, 04 Jul 2024 04:42:09 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1810@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>11.</strong></span> <span><strong>Redirect Output to a File</strong></span></span></span></span></h3><div><span><span><span>Modify a script to redirect the output of a `for` loop that prints numbers from 1 to 10 to a file named `output.txt`.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>10. User Input with Select Loop</title>
			<link>https://www.emblogic.com/forum/discussion/1811/10-user-input-with-select-loop</link>
			<pubDate>Thu, 04 Jul 2024 04:42:22 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1811@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>10</strong></span><span><strong>.</strong></span> <span><strong>User Input with Select Loop</strong></span></span></span></span></h3><div><span><span><span>Write a Bash script using the `select` loop to create a simple menu with options "Start", "Stop", "Restart", and "Quit". Perform different actions based on user selection.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>9. Logging Errors to a File</title>
			<link>https://www.emblogic.com/forum/discussion/1812/9-logging-errors-to-a-file</link>
			<pubDate>Thu, 04 Jul 2024 04:42:32 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1812@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>9.</strong></span> <span><strong>Logging Errors to a File</strong></span></span></span></span></h3><div><span><span><span>Create a script that reads a file line by line and logs any line containing the word "ERROR" to `error_log.txt`.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>8. Processing Each Word in a File</title>
			<link>https://www.emblogic.com/forum/discussion/1813/8-processing-each-word-in-a-file</link>
			<pubDate>Thu, 04 Jul 2024 04:42:43 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1813@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>8.</strong></span> <span><strong>Processing Each Word in a File</strong></span></span></span></span></h3><div><span><span><span>Write a script that reads a file named `input.txt` and prints each word in the file on a new line using nested loops.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>7. Reading a File Line by Line Using While Loop</title>
			<link>https://www.emblogic.com/forum/discussion/1814/7-reading-a-file-line-by-line-using-while-loop</link>
			<pubDate>Thu, 04 Jul 2024 04:42:55 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1814@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>7.</strong></span> <span><strong>Reading a File Line by Line Using While Loop</strong></span></span></span></span></h3><div><span><span><span>Create a Bash script that reads a file named `input.txt` line by line and prints each line.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>6. Until Loop: Increment Until Condition</title>
			<link>https://www.emblogic.com/forum/discussion/1815/6-until-loop-increment-until-condition</link>
			<pubDate>Thu, 04 Jul 2024 04:43:09 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1815@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>6.</strong></span> <span><strong>Until Loop: Increment Until Condition</strong></span></span></span></span></h3><div><span><span><span>Write a script using an `until` loop that increments a variable from 1 until it reaches 10 and prints each value.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>5. While Loop: Countdown Timer</title>
			<link>https://www.emblogic.com/forum/discussion/1816/5-while-loop-countdown-timer</link>
			<pubDate>Thu, 04 Jul 2024 04:43:22 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1816@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>5.</strong></span> <span><strong>While Loop: Countdown Timer</strong></span></span></span></span></h3><div><span><span><span>Write a Bash script using a `while` loop to create a countdown timer from 10 to 0, printing each number with a 1-second delay.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>4. Nested For Loop: Multiplication Table</title>
			<link>https://www.emblogic.com/forum/discussion/1817/4-nested-for-loop-multiplication-table</link>
			<pubDate>Thu, 04 Jul 2024 04:43:33 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1817@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>4.</strong></span> <span><strong>Nested For Loop: Multiplication Table</strong></span></span></span></span></h3><div><span><span><span>Create a Bash script that uses nested `for` loops to print the multiplication table (1 to 10).</span></span></span></div>]]></description>
		</item>
		<item>
			<title>3. C-Style For Loop: Sum of Numbers</title>
			<link>https://www.emblogic.com/forum/discussion/1818/3-c-style-for-loop-sum-of-numbers</link>
			<pubDate>Thu, 04 Jul 2024 04:43:47 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1818@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>3.</strong></span> <span><strong>C-Style For Loop: Sum of Numbers</strong></span></span></span></span></h3><div><span><span><span>Write a script using a C-style `for` loop to calculate the sum of numbers from 1 to 100 and print the result.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>2. Iterate Over List of Strings</title>
			<link>https://www.emblogic.com/forum/discussion/1819/2-iterate-over-list-of-strings</link>
			<pubDate>Thu, 04 Jul 2024 04:43:58 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1819@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>2.</strong></span> <span><strong>Iterate Over List of Strings</strong></span></span></span></span></h3><div><span><span><span>Create a Bash script that uses a `for` loop to iterate over a list of fruits ("apple", "banana", "cherry") and print each fruit.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>1. Basic For Loop: Print Numbers</title>
			<link>https://www.emblogic.com/forum/discussion/1820/1-basic-for-loop-print-numbers</link>
			<pubDate>Thu, 04 Jul 2024 04:44:09 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1820@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>1.</strong></span> <span><strong>Basic For Loop: Print Numbers</strong></span></span></span></span></h3><div><span><span><span>Write a Bash script using a `for` loop to print numbers from 1 to 10.</span></span></span></div>]]></description>
		</item>
		<item>
			<title>20. Complex Script: Interactive File Management System</title>
			<link>https://www.emblogic.com/forum/discussion/1801/20-complex-script-interactive-file-management-system</link>
			<pubDate>Thu, 04 Jul 2024 04:39:57 +0530</pubDate>
			<dc:creator>pravjot</dc:creator>
			<guid isPermaLink="false">1801@/forum/discussions</guid>
			<description><![CDATA[<h3><span><span><span><span><strong>20.</strong></span> <span><strong>Complex Script: Interactive File Management System</strong></span></span></span></span></h3><div><span><span><span>Create a complex interactive Bash script that provides a menu-driven interface for file management. The script should:</span></span></span></div><div><span><span><span><span>→</span> Offer options to create a file, delete a file, list files in a directory, and view the contents of a file.</span></span></span></div><div><span><span><span><span>→</span> Use nested `select` loops for submenus.</span></span></span></div><div><span><span><span><span>→</span> Implement error handling and user confirmations for file operations.</span></span></span></div>]]></description>
		</item>
   </channel>
</rss>