Example Scripts

You can also use scripts for repeating commands --looping
To do "math" in shell scripts, checkout expr and bc

  1. for loop with simple listing
  2. for loop listing number
  3. for loop that sums
  4. for loop that loops through arguments
  5. for loop with arguments
  6. for loop with date
  7. for loop with ls
  8. until loop
  9. while loop