πŸ•·οΈ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 53 (from laksa196)

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
10 days ago
πŸ€–
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.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://askubuntu.com/questions/166583/bash-for-loop-with-range
Last Crawled2026-04-04 08:46:47 (10 days ago)
First Indexed2015-08-05 23:24:47 (10 years ago)
HTTP Status Code200
Meta Titlecommand line - Bash for loop with range {#..#} - Ask Ubuntu
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
This question shows research effort; it is useful and clear 25 Save this question. Show activity on this post. The {#..#} generate a sequence of numbers or chars, similarly to range() in Python. If I execute the command echo {1..5} in the command line I have: 1 2 3 4 5 Instead the following bash script doesn't work as expected. for i in {1..3}; do echo "Iteration $i " done will print: Iteration {1..3} Why? *I could use seq but I read it's outdate ( http://www.cyberciti.biz/faq/bash-for-loop/ ) asked Jul 22, 2012 at 3:09 1 This answer is useful 34 Save this answer. Show activity on this post. I've tried your code (copy paste into a terminal) and it produced a different result from what you posted: for i in {1..3}; do echo "Iteration $i " done #---OUTPUT BELOW--- Iteration 1 Iteration 2 Iteration 3 Im using Linux Mint 12 Lisa (derived from Ubuntu) with bash version 4.2.10(1)-release answered Jul 22, 2012 at 3:26 5 You must log in to answer this question. Start asking to get answers Find the answer to your question by asking. Ask question Explore related questions See similar questions with these tags.
Markdown
# ![site logo](https://stackoverflow.com/Content/Img/SE-logo75.png) By clicking β€œSign up”, you agree to our [terms of service](https://askubuntu.com/legal/terms-of-service/public) and acknowledge you have read our [privacy policy](https://askubuntu.com/legal/privacy-policy). # OR Already have an account? [Log in](https://askubuntu.com/users/login) - [Ubuntu](http://www.ubuntu.com/) - [Community](http://community.ubuntu.com/) - [Ask\!](http://askubuntu.com/) - [Developer](http://developer.ubuntu.com/) - [Design](http://design.ubuntu.com/) - [Hardware](http://www.ubuntu.com/certification) - [Insights](http://insights.ubuntu.com/) - [Juju](https://jujucharms.com/) - [Shop](http://shop.ubuntu.com/) - [More β€Ί](https://askubuntu.com/questions/166583/bash-for-loop-with-range) - [Apps](http://apps.ubuntu.com/) - [Help](https://help.ubuntu.com/) - [Forum](http://ubuntuforums.org/) - [Launchpad](http://www.launchpad.net/) - [MAAS](http://maas.ubuntu.com/) - [Canonical](http://www.canonical.com/) [Skip to main content](https://askubuntu.com/questions/166583/bash-for-loop-with-range#content) #### Stack Exchange Network Stack Exchange network consists of 183 Q\&A communities including [Stack Overflow](https://stackoverflow.com/), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. [Visit Stack Exchange](https://stackexchange.com/) 1. - [Tour Start here for a quick overview of the site](https://askubuntu.com/tour) - [Help Center Detailed answers to any questions you might have](https://askubuntu.com/help) - [Meta Discuss the workings and policies of this site](https://meta.askubuntu.com/) - [About Us Learn more about Stack Overflow the company, and our products](https://stackoverflow.co/) 2. ### [current community](https://askubuntu.com/) - [Ask Ubuntu](https://askubuntu.com/) [help](https://askubuntu.com/help) [chat](https://chat.stackexchange.com/?tab=site&host=askubuntu.com) - [Ask Ubuntu Meta](https://meta.askubuntu.com/) ### your communities [Sign up](https://askubuntu.com/users/signup?ssrc=site_switcher&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583%2Fbash-for-loop-with-range) or [log in](https://askubuntu.com/users/login?ssrc=site_switcher&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583%2Fbash-for-loop-with-range) to customize your list. ### [more stack exchange communities](https://stackexchange.com/sites) [company blog](https://stackoverflow.blog/) 3. [Log in](https://askubuntu.com/users/login?ssrc=head&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583%2Fbash-for-loop-with-range) 4. [Sign up](https://askubuntu.com/users/signup?ssrc=head&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583%2Fbash-for-loop-with-range) [![Ask Ubuntu](https://askubuntu.com/Content/Sites/askubuntu/Img/logo.svg?v=472cf2768bba)](https://askubuntu.com/) 1. 1. [Home](https://askubuntu.com/) 2. [Questions](https://askubuntu.com/questions) 3. [Unanswered](https://askubuntu.com/unanswered) 4. [AI Assist](https://stackoverflow.com/ai-assist) 5. [Tags](https://askubuntu.com/tags) 6. [Chat](https://chat.stackexchange.com/) 7. [Users](https://askubuntu.com/users) 8. [Companies](https://stackoverflow.com/jobs/companies?so_medium=askubuntu&so_source=SiteNav) 2. Stack Internal Stack Overflow for Teams is now called **Stack Internal**. Bring the best of human thought and AI automation together at your work. [Try for free](https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams) [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams) 3. [Stack Internal]() 4. Bring the best of human thought and AI automation together at your work. [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams-compact) **Stack Internal** Knowledge at work Bring the best of human thought and AI automation together at your work. [Explore Stack Internal](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams-compact-popover) # [Bash for loop with range {\#..\#}](https://askubuntu.com/questions/166583/bash-for-loop-with-range) [Ask Question](https://askubuntu.com/questions/ask) Asked 13 years, 7 months ago Modified [4 years, 4 months ago](https://askubuntu.com/questions/166583/bash-for-loop-with-range?lastactivity "2021-10-29 15:56:43Z") Viewed 109k times This question shows research effort; it is useful and clear 25 Save this question. Show activity on this post. The {\#..\#} generate a sequence of numbers or chars, similarly to range() in Python. If I execute the command `echo {1..5}` in the command line I have: ``` 1 2 3 4 5 ``` Instead the following bash script doesn't work as expected. ``` for i in {1..3}; do echo "Iteration $i" done ``` will print: ``` Iteration {1..3} ``` Why? \*I could use `seq` but I read it's outdate (<http://www.cyberciti.biz/faq/bash-for-loop/>) - [command-line](https://askubuntu.com/questions/tagged/command-line "show questions tagged 'command-line'") - [bash](https://askubuntu.com/questions/tagged/bash "show questions tagged 'bash'") [Share](https://askubuntu.com/q/166583 "Short permalink to this question") Share a link to this question Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this question](https://askubuntu.com/posts/166583/edit) Follow Follow this question to receive notifications asked Jul 22, 2012 at 3:09 [![Shake0's user avatar](https://www.gravatar.com/avatar/c9ee854f77e7db5909256d9961f7b448?s=64&d=identicon&r=PG)](https://askubuntu.com/users/27662/shake0) [Shake0](https://askubuntu.com/users/27662/shake0) 35311 gold badge44 silver badges66 bronze badges 1 - 3 This error occur if the script is executed by the "sh" command (try using "bash"). Shake0 – [Shake0](https://askubuntu.com/users/27662/shake0 "353 reputation") 2012-07-22 03:39:43 +00:00 [Commented Jul 22, 2012 at 3:39](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment204485_166583) [Add a comment](https://askubuntu.com/questions/166583/bash-for-loop-with-range "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.") \| ## 1 Answer 1 Sorted by: [Reset to default](https://askubuntu.com/questions/166583/bash-for-loop-with-range?answertab=scoredesc#tab-top) This answer is useful 34 Save this answer. Show activity on this post. I've tried your code (copy paste into a terminal) and it produced a different result from what you posted: ``` for i in {1..3}; do echo "Iteration $i" done #---OUTPUT BELOW--- Iteration 1 Iteration 2 Iteration 3 ``` Im using Linux Mint 12 Lisa (derived from Ubuntu) with bash version *4\.2.10(1)-release* [Share](https://askubuntu.com/a/166586 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/ "The current license for this post: CC BY-SA 3.0") [Improve this answer](https://askubuntu.com/posts/166586/edit) Follow Follow this answer to receive notifications answered Jul 22, 2012 at 3:26 [![zipizap's user avatar](https://www.gravatar.com/avatar/04f5e260b2169925efcdffa51c52419e?s=64&d=identicon&r=PG)](https://askubuntu.com/users/39101/zipizap) [zipizap](https://askubuntu.com/users/39101/zipizap) 60455 silver badges1111 bronze badges 5 - 5 You are right! I thought sh and bash were the same thing.. Shake0 – [Shake0](https://askubuntu.com/users/27662/shake0 "353 reputation") 2012-07-22 03:36:27 +00:00 [Commented Jul 22, 2012 at 3:36](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment204484_166586) - 3 no, bash and sh are quite different... bash is more capable than sh, it was made on the shoulders of sh :) although they both have a good degree of compatibility, they also have its differences zipizap – [zipizap](https://askubuntu.com/users/39101/zipizap "604 reputation") 2013-12-12 14:13:10 +00:00 [Commented Dec 12, 2013 at 14:13](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment498570_166586) - 1 note that you can do nested lists like for var in {{i..j},{l..m}};do echo \$var;done if you need irregular sequence such as 1 2 3 7 8 9 brown.2179 – [brown.2179](https://askubuntu.com/users/279808/brown-2179 "101 reputation") 2014-05-09 15:34:23 +00:00 [Commented May 9, 2014 at 15:34](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment611222_166586) - Note that on some distros `/bin/sh` IS actually pointing at bash, on Debian and Ubuntu it is typically pointing to `/bin/dash` which is mostly POSIX compliant but doesn't support all the same syntax as Bash. dragon788 – [dragon788](https://askubuntu.com/users/318507/dragon788 "1,746 reputation") 2017-05-22 20:25:59 +00:00 [Commented May 22, 2017 at 20:25](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment1447842_166586) - As of Debian 12, there is a symlink /bin/sh -\> bash FLAK-ZOSO – [FLAK-ZOSO](https://askubuntu.com/users/1559059/flak-zoso "101 reputation") 2025-08-21 09:31:29 +00:00 [Commented Aug 21, 2025 at 9:31](https://askubuntu.com/questions/166583/bash-for-loop-with-range#comment2734221_166586) [Add a comment](https://askubuntu.com/questions/166583/bash-for-loop-with-range "Use comments to ask for more information or suggest improvements. Avoid comments like β€œ+1” or β€œthanks”.") \| ## You must [log in](https://askubuntu.com/users/login?ssrc=question_page&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583) to answer this question. Start asking to get answers Find the answer to your question by asking. [Ask question](https://askubuntu.com/questions/ask) Explore related questions - [command-line](https://askubuntu.com/questions/tagged/command-line "show questions tagged 'command-line'") - [bash](https://askubuntu.com/questions/tagged/bash "show questions tagged 'bash'") See similar questions with these tags. - The Overflow Blog - [Even the chip makers are making LLMs](https://stackoverflow.blog/2026/03/10/even-the-chip-makers-are-making-llms/?cb=1) - Featured on Meta - [Logo updates to Stack Overflow's visual identity](https://meta.stackexchange.com/questions/417394/logo-updates-to-stack-overflows-visual-identity?cb=1) - [Should the Community Bot stop bumping questions from EOL releases?](https://meta.askubuntu.com/questions/20776/should-the-community-bot-stop-bumping-questions-from-eol-releases?cb=1) #### Related [2](https://askubuntu.com/questions/333862/repetitive-tasks-with-bash-scripting?rq=1 "Question score (upvotes - downvotes)") [Repetitive Tasks with bash scripting](https://askubuntu.com/questions/333862/repetitive-tasks-with-bash-scripting?rq=1) [1](https://askubuntu.com/questions/1034955/problem-with-awk-inside-bash?rq=1 "Question score (upvotes - downvotes)") [Problem with AWK inside bash](https://askubuntu.com/questions/1034955/problem-with-awk-inside-bash?rq=1) [2](https://askubuntu.com/questions/1072568/add-flag-to-existing-terminal-command?rq=1 "Question score (upvotes - downvotes)") [Add flag to existing terminal command](https://askubuntu.com/questions/1072568/add-flag-to-existing-terminal-command?rq=1) [0](https://askubuntu.com/questions/1119508/ubuntu-16-04-tar-backup-with-progress-bar-pv-pipe-viewer-not-working?rq=1 "Question score (upvotes - downvotes)") [Ubuntu 16.04 tar backup with progress bar PV (Pipe Viewer) not working](https://askubuntu.com/questions/1119508/ubuntu-16-04-tar-backup-with-progress-bar-pv-pipe-viewer-not-working?rq=1) [0](https://askubuntu.com/questions/1184201/adding-if-statement-to-an-existing-while-loop?rq=1 "Question score (upvotes - downvotes)") [Adding if statement to an existing while loop](https://askubuntu.com/questions/1184201/adding-if-statement-to-an-existing-while-loop?rq=1) [0](https://askubuntu.com/questions/1329739/using-if-inside-two-while-loops-in-bash-if-completed-skipped?rq=1 "Question score (upvotes - downvotes)") [Using 'if' inside two 'while' loops in bash -- 'if' completed skipped](https://askubuntu.com/questions/1329739/using-if-inside-two-while-loops-in-bash-if-completed-skipped?rq=1) [1](https://askubuntu.com/questions/1439454/curly-braces-in-a-bash-variable-expands-correctly-but-the-rsync-isnt-properly?rq=1 "Question score (upvotes - downvotes)") [Curly braces in a bash variable expands correctly, but the rsync isn't properly executing](https://askubuntu.com/questions/1439454/curly-braces-in-a-bash-variable-expands-correctly-but-the-rsync-isnt-properly?rq=1) [0](https://askubuntu.com/questions/1551013/bash-script-vs-command-line-variable-not-working?rq=1 "Question score (upvotes - downvotes)") [Bash Script vs Command Line - Variable not working](https://askubuntu.com/questions/1551013/bash-script-vs-command-line-variable-not-working?rq=1) #### [Hot Network Questions](https://stackexchange.com/questions?tab=hot) - [CLI Task Tracker](https://codereview.stackexchange.com/questions/301573/cli-task-tracker) - [How do I reposition a building kit?](https://gaming.stackexchange.com/questions/418140/how-do-i-reposition-a-building-kit) - [Tire Pressure Calculator and Hybrids](https://bicycles.stackexchange.com/questions/100080/tire-pressure-calculator-and-hybrids) - [What is the difference between γ‚γ‚ŠγŒγ¨γ†γ”γ–γ„γΎγ™, γ‚γ‚ŠγŒγ¨γ†γ”γ–γ„γΎγ—γŸ, and just どうも when expressing thanks?](https://japanese.stackexchange.com/questions/111855/what-is-the-difference-between-%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99-%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F-and-just-%E3%81%A9%E3%81%86%E3%82%82-when-expres) - [Do I need to hurry in Baldur's Gate 3?](https://gaming.stackexchange.com/questions/418127/do-i-need-to-hurry-in-baldurs-gate-3) - [Does Sam Harris' view of No Self run at odds with his ethics?](https://philosophy.stackexchange.com/questions/136921/does-sam-harris-view-of-no-self-run-at-odds-with-his-ethics) - [What does it mean to factor a real number?](https://math.stackexchange.com/questions/5128290/what-does-it-mean-to-factor-a-real-number) - [Size matters: how can I disable the huge file warning in Notepad++ while searching for text within files?](https://superuser.com/questions/1935781/size-matters-how-can-i-disable-the-huge-file-warning-in-notepad-while-searchi) - [Should I cross my fingers while playing staccato scales on the piano?](https://music.stackexchange.com/questions/143337/should-i-cross-my-fingers-while-playing-staccato-scales-on-the-piano) - [Increase tcolorbox text width to correspond to page text width](https://tex.stackexchange.com/questions/760743/increase-tcolorbox-text-width-to-correspond-to-page-text-width) - [Is Romans 1:26-27 talking about pagan orgies?](https://hermeneutics.stackexchange.com/questions/115254/is-romans-126-27-talking-about-pagan-orgies) - [Two OSPF Area Questions](https://networkengineering.stackexchange.com/questions/88774/two-ospf-area-questions) - [The categories of ultrafilters and their representations](https://mathoverflow.net/questions/509001/the-categories-of-ultrafilters-and-their-representations) - [Math PhD applicant CV advice](https://academia.stackexchange.com/questions/226165/math-phd-applicant-cv-advice) - [Boundedness of second order elliptic operator after convolution](https://mathoverflow.net/questions/509009/boundedness-of-second-order-elliptic-operator-after-convolution) - [How to deal with the staff manager who is emotionally threatening me when I decided to quit?](https://workplace.stackexchange.com/questions/203262/how-to-deal-with-the-staff-manager-who-is-emotionally-threatening-me-when-i-deci) - [Unknown abbreviation for relay contacts in schematic](https://electronics.stackexchange.com/questions/766776/unknown-abbreviation-for-relay-contacts-in-schematic) - [What makes y = 0 and y = 1 different in \`Table\[x + y /. x -\> 420, {x, 3}\]\`?](https://mathematica.stackexchange.com/questions/318997/what-makes-y-0-and-y-1-different-in-tablex-y-x-420-x-3) - [New Release of Mosaico Extension not Discovered](https://civicrm.stackexchange.com/questions/51305/new-release-of-mosaico-extension-not-discovered) - [Income tax: How are pre-tax funds deducted from earnings?](https://money.stackexchange.com/questions/169378/income-tax-how-are-pre-tax-funds-deducted-from-earnings) - [Short story collection read online c.2018-2019 with a story about an abandoned house with a series of arcade game cabinets](https://scifi.stackexchange.com/questions/303655/short-story-collection-read-online-c-2018-2019-with-a-story-about-an-abandoned-h) - [Faster way to list all files in directory?](https://stackoverflow.com/questions/79905435/faster-way-to-list-all-files-in-directory) - [Causal effects without a control group?](https://stats.stackexchange.com/questions/675113/causal-effects-without-a-control-group) - [According to Catholicism, why is transubstantiation important?](https://christianity.stackexchange.com/questions/113347/according-to-catholicism-why-is-transubstantiation-important) [more hot questions](https://askubuntu.com/questions/166583/bash-for-loop-with-range) [Question feed](https://askubuntu.com/feeds/question/166583 "Feed of this question and its answers") # Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. ![](https://askubuntu.com/posts/166583/ivc/d1c6?prg=73184676-2ffe-4471-963b-6bd2da1da40f) lang-bash # Why are you flagging this comment? It contains harassment, bigotry or abuse. This comment attacks a person or group. Learn more in our [Abusive behavior policy](https://askubuntu.com/conduct/abusive-behavior). It's unfriendly or unkind. This comment is rude or condescending. Learn more in our [Code of Conduct](https://askubuntu.com/conduct/abusive-behavior). Not needed. This comment is not relevant to the post. ``` ``` Enter at least 6 characters Something else. A problem not listed above. Try to be as specific as possible. ``` ``` Enter at least 6 characters Flag comment Cancel You have 0 flags left today # ![Illustration of upvote icon after it is clicked](https://askubuntu.com/Content/Img/modal/img-upvote.png?v=fce73bd9724d) # Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. **Upvoting** indicates when questions and answers are useful. [What's reputation and how do I get it?](https://stackoverflow.com/help/whats-reputation) Instead, you can save this post to reference later. Save this post for later Not now ##### [Ask Ubuntu](https://askubuntu.com/) - [Tour](https://askubuntu.com/tour) - [Help](https://askubuntu.com/help) - [Chat](https://chat.stackexchange.com/?tab=site&host=askubuntu.com) - [Contact](https://askubuntu.com/contact) - [Feedback](https://meta.askubuntu.com/) ##### [Company](https://stackoverflow.co/) - [Stack Overflow](https://stackoverflow.com/) - [Stack Internal](https://stackoverflow.co/internal/) - [Stack Data Licensing](https://stackoverflow.co/data-licensing/) - [Stack Ads](https://stackoverflow.co/advertising/) - [About](https://stackoverflow.co/) - [Press](https://stackoverflow.co/company/press/) - [Legal](https://stackoverflow.com/legal) - [Privacy Policy](https://stackoverflow.com/legal/privacy-policy) - [Terms of Service](https://stackoverflow.com/legal/terms-of-service/public) - Cookie Settings - [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy) ##### [Stack Exchange Network](https://stackexchange.com/) - [Technology](https://stackexchange.com/sites#technology) - [Culture & recreation](https://stackexchange.com/sites#culturerecreation) - [Life & arts](https://stackexchange.com/sites#lifearts) - [Science](https://stackexchange.com/sites#science) - [Professional](https://stackexchange.com/sites#professional) - [Business](https://stackexchange.com/sites#business) - [API](https://api.stackexchange.com/) - [Data](https://data.stackexchange.com/) - [Blog](https://stackoverflow.blog/?blb=1) - [Facebook](https://www.facebook.com/officialstackoverflow/) - [Twitter](https://twitter.com/stackoverflow) - [LinkedIn](https://linkedin.com/company/stack-overflow) - [Instagram](https://www.instagram.com/thestackoverflow) Site design / logo Β© 2026 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing) . rev 2026.3.12.40898 Ubuntu and the circle of friends logo are trade marks of Canonical Limited and are used under licence.
Readable Markdown
This question shows research effort; it is useful and clear 25 Save this question. Show activity on this post. The {\#..\#} generate a sequence of numbers or chars, similarly to range() in Python. If I execute the command `echo {1..5}` in the command line I have: ``` 1 2 3 4 5 ``` Instead the following bash script doesn't work as expected. ``` for i in {1..3}; do echo "Iteration $i" done ``` will print: ``` Iteration {1..3} ``` Why? \*I could use `seq` but I read it's outdate (<http://www.cyberciti.biz/faq/bash-for-loop/>) asked Jul 22, 2012 at 3:09 [![Shake0's user avatar](https://www.gravatar.com/avatar/c9ee854f77e7db5909256d9961f7b448?s=64&d=identicon&r=PG)](https://askubuntu.com/users/27662/shake0) 1 This answer is useful 34 Save this answer. Show activity on this post. I've tried your code (copy paste into a terminal) and it produced a different result from what you posted: ``` for i in {1..3}; do echo "Iteration $i" done #---OUTPUT BELOW--- Iteration 1 Iteration 2 Iteration 3 ``` Im using Linux Mint 12 Lisa (derived from Ubuntu) with bash version *4\.2.10(1)-release* answered Jul 22, 2012 at 3:26 [![zipizap's user avatar](https://www.gravatar.com/avatar/04f5e260b2169925efcdffa51c52419e?s=64&d=identicon&r=PG)](https://askubuntu.com/users/39101/zipizap) 5 ## You must [log in](https://askubuntu.com/users/login?ssrc=question_page&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F166583) to answer this question. Start asking to get answers Find the answer to your question by asking. [Ask question](https://askubuntu.com/questions/ask) Explore related questions See similar questions with these tags.
Shard53 (laksa)
Root Hash9277990770814737653
Unparsed URLcom,askubuntu!/questions/166583/bash-for-loop-with-range s443