You are not logged in.
Pages: 1
How to run an external bash (or any language) script in Ruby? Or directly within Ruby e.g. "pacman -Sy".
Markku
Offline
you mean system("command")?
Offline
Yes.
Example, to run /usr/bin/hwd (bash script) from a Ruby script. What's the command to rum an external script?
Markku
Offline
I think what wam meant is that you use the <code>system</code> command in Ruby, so the syntax would be:
system("/usr/bin/hwd")
Offline
Got this from mindtriggerz, developing Pry (Pacman Ruby).
http://bbs.archlinux.org/viewtopic.php?t=20447
%x{this is a command}
Example:
%x{/usr/bin/hwd}
Markku
Offline
%x{ is a nice shorthand way of doing things, but for dynamic things, Kernel.system is better
[img]http://www.d-destroy.de/userbars/windowsserver.png[/img]
[Pry Developer][FlashHater]
Offline
Pages: 1