We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Linux Shell
  3. Bash
  4. Looping and Skipping
  5. Tutorial

Looping and Skipping

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

for loops in Bash can be used in several ways:
- iterating between two integers, and
- iterating between two integers, and , and incrementing by each time
- iterating through the elements of an array, etc.

Recommended Resources

A quick but useful tutorial for bash newcomers is here.
Handling input is documented and explained quite well on this page.
Different ways in which for loops may be used are explained with examples here.

Solve Problem

tutorial details


Need Help?


View discussions
View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy