🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 77 (from laksa051)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
2 months ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH2.4 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://medium.com/@codingcampus/bash-for-loop-with-examples-ff1d88b9ad42
Last Crawled2026-02-08 16:57:04 (2 months ago)
First Indexednot set
HTTP Status Code200
Content
Meta TitleBash For Loop (With Examples). Bash for loop is a bash statement that… | by CodingCampus | Medium
Meta DescriptionBash For Loop (With Examples) Bash for loop is a bash statement that allows code to be executed repeatedly. Loops can be used at the command line prompt or within a shell script. Bash for Loop Basic …
Meta Canonicalnull
Boilerpipe Text
3 min read Nov 23, 2023 -- Press enter or click to view image in full size Bash for loop is a bash statement that allows code to be executed repeatedly. Loops can be used at the command line prompt or within a shell script. Bash for Loop Basic Syntax The basic syntax of bash for loop is for <variable> in <list> do <commands> done <list> is a sequence of any values (words, numbers, etc.) separated by spaces. <commands> is a set of any valid Bash command (usually executed over a list of items). for is a loop syntax keyword. <variable> is a bash variable name used to get access to the item from the list. Here’s a basic bash for loop example. for VARIABLE in "blue" "green" "red" "orange" "yellow" do echo "$VARIABLE" done Press enter or click to view image in full size A basic example of bash for loop. You can see a list of our variables (blue, green, red, orange, yellow) displayed in the terminal. Basic Bash For Loop Examples Strings Example In this example, we display the days of the work week. for weekday in Monday Tuesday Wednesday Thursday Friday do echo "Day of the week is $weekday" done Press enter or click to view image in full size Strings example — bash for loop Range Example In this example, we count (the range) from 45 to 50 . for num in {45..50} do echo "The number is $num" done Press enter or click to view image in full size Range example — bash for loop Arrays Example In this example, we iterate through the teams in the nflteams array. nflteam=('Chiefs' 'Raiders' 'Broncos' 'Chargers') for nflteam in "${nflteam[@]}" do echo "NFL Team: $nflteam" done Press enter or click to view image in full size Array example — bash for loop Increments Example In this example, we count from 0 to 40 in increments of 10 . for num in {0..40..10} do echo "The number is $num" done Press enter or click to view image in full size Increments example — bash for loop Infinite Loop Example In this example, we create an infinite loop using an empty expression. The only way to stop the loop is by pressing <Ctrl>C . for (( ; ; )) do echo "This is an infinite loop! [Press CTRL+C to abort]" done Press enter or click to view image in full size Infinite loop example -bash for loop Break Statement Example In this example, we cycle through the letters K through Q and break when we come to the letter O . for letter in {K..Q} do if [[ "$letter" == 'O' ]]; then break fi echo "The letter is: $letter" done Press enter or click to view image in full size Break statement example — bash for loop Continue Statement Example In this example, we cycle through the numbers 1 through 10 . When we come to the number 5 , we skip the number and continue counting until we reach 10 . for num in {1..10} do if [[ "$num" == '5' ]]; then continue fi echo "The number is: $num" done Press enter or click to view image in full size Continue statement example — bash for loop.
Markdown
[Sitemap](https://medium.com/sitemap/sitemap.xml) [Open in app](https://play.google.com/store/apps/details?id=com.medium.reader&referrer=utm_source%3DmobileNavBar&source=post_page---top_nav_layout_nav-----------------------------------------) Sign up [Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40codingcampus%2Fbash-for-loop-with-examples-ff1d88b9ad42&source=post_page---top_nav_layout_nav-----------------------global_nav------------------) [Medium Logo](https://medium.com/?source=post_page---top_nav_layout_nav-----------------------------------------) [Write](https://medium.com/m/signin?operation=register&redirect=https%3A%2F%2Fmedium.com%2Fnew-story&source=---top_nav_layout_nav-----------------------new_post_topnav------------------) [Search](https://medium.com/search?source=post_page---top_nav_layout_nav-----------------------------------------) Sign up [Sign in](https://medium.com/m/signin?operation=login&redirect=https%3A%2F%2Fmedium.com%2F%40codingcampus%2Fbash-for-loop-with-examples-ff1d88b9ad42&source=post_page---top_nav_layout_nav-----------------------global_nav------------------) ![](https://miro.medium.com/v2/resize:fill:64:64/1*dmbNkD5D-u45r44go_cf0g.png) # [Bash For Loop (With Examples)](https://codingcampus.net/wp-admin/post.php?post=410&action=edit) [![CodingCampus](https://miro.medium.com/v2/resize:fill:64:64/1*rU40ljKwLNbDxuZwEqGxvA.jpeg)](https://medium.com/@codingcampus?source=post_page---byline--ff1d88b9ad42---------------------------------------) [CodingCampus](https://medium.com/@codingcampus?source=post_page---byline--ff1d88b9ad42---------------------------------------) 3 min read · Nov 23, 2023 \-- Listen Share Press enter or click to view image in full size ![]() Bash for loop is a bash statement that allows code to be executed repeatedly. Loops can be used at the command line prompt or within a shell script. ## Bash for Loop Basic Syntax The basic syntax of bash for loop is ``` for <variable> in <list> do <commands> done ``` - **\<list\>** is a sequence of any values (words, numbers, etc.) separated by spaces. - **\<commands\>** is a set of any valid Bash command (usually executed over a list of items). - **for** is a loop syntax keyword. - **\<variable\>** is a bash variable name used to get access to the item from the list. Here’s a basic bash for loop example. ``` for VARIABLE in "blue" "green" "red" "orange" "yellow" do echo "$VARIABLE" done ``` Press enter or click to view image in full size ![]() A basic example of bash for loop. You can see a list of our variables (blue, green, red, orange, yellow) displayed in the terminal. ## Basic Bash For Loop Examples ## Strings Example In this example, we display the days of the work week. ``` for weekday in Monday Tuesday Wednesday Thursday Friday do echo "Day of the week is $weekday" done ``` Press enter or click to view image in full size ![]() Strings example — bash for loop ## Range Example In this example, we count (the range) from **45** to **50**. ``` for num in {45..50} do echo "The number is $num" done ``` Press enter or click to view image in full size ![]() Range example — bash for loop ## Arrays Example In this example, we iterate through the teams in the **nflteams** array. ``` nflteam=('Chiefs' 'Raiders' 'Broncos' 'Chargers') for nflteam in "${nflteam[@]}" do echo "NFL Team: $nflteam" done ``` Press enter or click to view image in full size ![]() Array example — bash for loop ## Increments Example In this example, we count from **0** to **40** in increments of **10**. ``` for num in {0..40..10} do echo "The number is $num" done ``` Press enter or click to view image in full size ![]() Increments example — bash for loop ## Infinite Loop Example In this example, we create an infinite loop using an empty expression. The only way to stop the loop is by pressing **\<Ctrl\>C**. ``` for (( ; ; )) do echo "This is an infinite loop! [Press CTRL+C to abort]" done ``` Press enter or click to view image in full size ![]() Infinite loop example -bash for loop ## Break Statement Example In this example, we cycle through the letters **K** through **Q** and break when we come to the letter **O**. ``` for letter in {K..Q} do if [[ "$letter" == 'O' ]]; then break fi echo "The letter is: $letter" done ``` Press enter or click to view image in full size ![]() Break statement example — bash for loop ## Continue Statement Example In this example, we cycle through the numbers **1** through **10**. When we come to the number **5**, we skip the number and continue counting until we reach **10**. ``` for num in {1..10} do if [[ "$num" == '5' ]]; then continue fi echo "The number is: $num" done ``` Press enter or click to view image in full size ![]() Continue statement example — bash for loop. [Bash For Loop](https://medium.com/tag/bash-for-loop?source=post_page-----ff1d88b9ad42---------------------------------------) [Unix](https://medium.com/tag/unix?source=post_page-----ff1d88b9ad42---------------------------------------) [Linux](https://medium.com/tag/linux?source=post_page-----ff1d88b9ad42---------------------------------------) [Coding](https://medium.com/tag/coding?source=post_page-----ff1d88b9ad42---------------------------------------) \-- \-- [![CodingCampus](https://miro.medium.com/v2/resize:fill:96:96/1*rU40ljKwLNbDxuZwEqGxvA.jpeg)](https://medium.com/@codingcampus?source=post_page---post_author_info--ff1d88b9ad42---------------------------------------) [![CodingCampus](https://miro.medium.com/v2/resize:fill:128:128/1*rU40ljKwLNbDxuZwEqGxvA.jpeg)](https://medium.com/@codingcampus?source=post_page---post_author_info--ff1d88b9ad42---------------------------------------) [Written by CodingCampus](https://medium.com/@codingcampus?source=post_page---post_author_info--ff1d88b9ad42---------------------------------------) [10 followers](https://medium.com/@codingcampus/followers?source=post_page---post_author_info--ff1d88b9ad42---------------------------------------) ·[1 following](https://medium.com/@codingcampus/following?source=post_page---post_author_info--ff1d88b9ad42---------------------------------------) ## No responses yet [Help](https://help.medium.com/hc/en-us?source=post_page-----ff1d88b9ad42---------------------------------------) [Status](https://status.medium.com/?source=post_page-----ff1d88b9ad42---------------------------------------) [About](https://medium.com/about?autoplay=1&source=post_page-----ff1d88b9ad42---------------------------------------) [Careers](https://medium.com/jobs-at-medium/work-at-medium-959d1a85284e?source=post_page-----ff1d88b9ad42---------------------------------------) [Press](mailto:pressinquiries@medium.com) [Blog](https://blog.medium.com/?source=post_page-----ff1d88b9ad42---------------------------------------) [Privacy](https://policy.medium.com/medium-privacy-policy-f03bf92035c9?source=post_page-----ff1d88b9ad42---------------------------------------) [Rules](https://policy.medium.com/medium-rules-30e5502c4eb4?source=post_page-----ff1d88b9ad42---------------------------------------) [Terms](https://policy.medium.com/medium-terms-of-service-9db0094a1e0f?source=post_page-----ff1d88b9ad42---------------------------------------) [Text to speech](https://speechify.com/medium?source=post_page-----ff1d88b9ad42---------------------------------------)
Readable Markdown
[![CodingCampus](https://miro.medium.com/v2/resize:fill:64:64/1*rU40ljKwLNbDxuZwEqGxvA.jpeg)](https://medium.com/@codingcampus?source=post_page---byline--ff1d88b9ad42---------------------------------------) 3 min read Nov 23, 2023 \-- Press enter or click to view image in full size Bash for loop is a bash statement that allows code to be executed repeatedly. Loops can be used at the command line prompt or within a shell script. ## Bash for Loop Basic Syntax The basic syntax of bash for loop is ``` for <variable> in <list> do <commands> done ``` - **\<list\>** is a sequence of any values (words, numbers, etc.) separated by spaces. - **\<commands\>** is a set of any valid Bash command (usually executed over a list of items). - **for** is a loop syntax keyword. - **\<variable\>** is a bash variable name used to get access to the item from the list. Here’s a basic bash for loop example. ``` for VARIABLE in "blue" "green" "red" "orange" "yellow" do echo "$VARIABLE" done ``` Press enter or click to view image in full size A basic example of bash for loop. You can see a list of our variables (blue, green, red, orange, yellow) displayed in the terminal. ## Basic Bash For Loop Examples ## Strings Example In this example, we display the days of the work week. ``` for weekday in Monday Tuesday Wednesday Thursday Friday do echo "Day of the week is $weekday" done ``` Press enter or click to view image in full size Strings example — bash for loop ## Range Example In this example, we count (the range) from **45** to **50**. ``` for num in {45..50} do echo "The number is $num" done ``` Press enter or click to view image in full size Range example — bash for loop ## Arrays Example In this example, we iterate through the teams in the **nflteams** array. ``` nflteam=('Chiefs' 'Raiders' 'Broncos' 'Chargers') for nflteam in "${nflteam[@]}" do echo "NFL Team: $nflteam" done ``` Press enter or click to view image in full size Array example — bash for loop ## Increments Example In this example, we count from **0** to **40** in increments of **10**. ``` for num in {0..40..10} do echo "The number is $num" done ``` Press enter or click to view image in full size Increments example — bash for loop ## Infinite Loop Example In this example, we create an infinite loop using an empty expression. The only way to stop the loop is by pressing **\<Ctrl\>C**. ``` for (( ; ; )) do echo "This is an infinite loop! [Press CTRL+C to abort]" done ``` Press enter or click to view image in full size Infinite loop example -bash for loop ## Break Statement Example In this example, we cycle through the letters **K** through **Q** and break when we come to the letter **O**. ``` for letter in {K..Q} do if [[ "$letter" == 'O' ]]; then break fi echo "The letter is: $letter" done ``` Press enter or click to view image in full size Break statement example — bash for loop ## Continue Statement Example In this example, we cycle through the numbers **1** through **10**. When we come to the number **5**, we skip the number and continue counting until we reach **10**. ``` for num in {1..10} do if [[ "$num" == '5' ]]; then continue fi echo "The number is: $num" done ``` Press enter or click to view image in full size Continue statement example — bash for loop.
ML Classification
ML Categoriesnull
ML Page Typesnull
ML Intent Typesnull
Content Metadata
Languageen
Authornull
Publish Time2023-11-23 12:33:44 (2 years ago)
Original Publish Timenot set
RepublishedYes
Word Count (Total)615
Word Count (Content)541
Links
External Links4
Internal Links27
Technical SEO
Meta NofollowNo
Meta NoarchiveYes
JS RenderedNo
Redirect Targetnull
Performance
Download Time (ms)461
TTFB (ms)460
Download Size (bytes)30,398
Shard77 (laksa)
Root Hash13179037029838926277
Unparsed URLcom,medium!/@codingcampus/bash-for-loop-with-examples-ff1d88b9ad42 s443