[Ruby] Tar'ing or Zip'ing with ruby script
Is there anyway to pass shell commands through ruby script?
I want to be able to tar or zip files but don't want to have to create a separate script to do this and then have ruby finish the rest of the job. Is there a way that I can insert a tar or zip command inside of my ruby script? |
Hi, sorry this is somewhat late.
The Zlib module (part of the standard library) has support for zip and gzip handling of files: http://www.ruby-doc.org/stdlib/libdo...doc/index.html Also, the Kernel module has a method "system(cmd, [args]*)" that executes a command in a subshell: http://www.ruby-doc.org/core/classes/Kernel.html Edit: Yay! This is my (expt 2 9)th post! |
Thanks for the reply, I will give it a shot...
|
All times are GMT -5. The time now is 11:16 PM. |