I am writing a gallery maker (HTML) in ruby and could need some help…
I already know how to write to files.
What I don’t know is following:
How can i execute some native commands in Ruby? (For example ls | grep “jpg” >
What I am planning to do is executing this linux command, so that all
image files names get stored in a local file on the HD.
And after that i want to read the filenames in my ruby application one by
one, cause each file has an own line in this output file.
So, it should look like this:
executeNativeCommand(“ls | grep “jpg” > pictures.txt”)
pictureFile = File.open(“pictures.txt”,“r”)
I don’t know the Ruby syntax that’s why I wrote it in kind of “spoken code”
Hope someone can help me out,
Thanks in advance, Benjamin
Do You Yahoo!?
Yahoo! Health - Feel better, live better