I now think there are two points I can make:
1.If you're going to script, use Ruby
2.If you're going to use Ruby, use a *nix system
There are so many reasons you should use Ruby; embedding arrays in arrays, the ability to treat strings as arrays of characters, the ease of access to file I/O, embedding functions in arrays, creating get/let statements in one line, heredocs for creating large strings, and my personal favorite -- ranges of strings.
When you use a range in Ruby like this
- Code: Select all
For str in ("aaaaaaaa".."ZZZZZZZZZZZZZZZZ") do
tab--> puts(str)
End
It will iterate though all letter combinations from 8 lowercase a's to 16 uppercase Z's.
Now this might not be practical or useful in most situations, but it's certainly better than the alternative in other languages.
My second point is about Ruby and *nix and the way they could work together.
In Ruby, surrounding a string with backwards apostrophes like this
- Code: Select all
myDirs = `dir`
will send the command dir to your PC [in windows this will return a list of folders and files] and set the variable 'myDirs' equal to the return value.
This is an EXTREMELY unique and very useful feature of Ruby.
Mix this with the variety of commands on a *nix system, and you have a scripting language OS combination that can do just about anything.
Correct me if I made any mistakes lol.



