Stories
Slash Boxes
Comments

SoylentNews is people

posted by LaminatorX on Sunday October 12 2014, @09:19AM   Printer-friendly
from the Bad-Ass-Script-Host dept.

When I first learned about Linux in the 90’s, I read that it was possible to even write your own commands to use at the command line. Later I learned about bash scripting, and it wasn’t long before I needed to learn how to loop in bash. Looping in bash is one of the fundamental building blocks of bash programming. It isn’t hard to do at all and is worth learning. The main reason to learn looping in bash is to handle doing the same thing over and over again. They’re easy to do even at the command line. Please follow along as we look a couple of basic examples, and how you can expand on them.

http://www.tidbitsfortechs.com/2014/10/looping-in-bash/

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by theluggage on Sunday October 12 2014, @11:07AM

    by theluggage (1797) on Sunday October 12 2014, @11:07AM (#105023)

    This is not news. Not even close

    But... "bash" is a trending keyword at the moment, and surely the language every l33t haX0r wants to learn right now. I hope part 2 of this article covers how to embed loops in environment variable declarations.

    P.S. Heartbleed had a logo. Where's the shellshock logo? I thought every security vulnerability got a snappy name and a logo now?

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 0) by Anonymous Coward on Sunday October 12 2014, @02:38PM

    by Anonymous Coward on Sunday October 12 2014, @02:38PM (#105057)

    Here you go... [twimg.com]

  • (Score: 0) by Anonymous Coward on Monday October 13 2014, @02:08PM

    by Anonymous Coward on Monday October 13 2014, @02:08PM (#105557)
    Given the security and code quality problems with bash perhaps we should start learning to write stuff so that it's not bash specific.