D
Dragoescu Daniel
Note: parts of this message were removed by the gateway to make it a legal Usenet post.
Hello guys!
I am a newbie in ruby and i have a question. I run a system command and i
want that the ouput of that command to be assigne to a variable, something
like this:
var1 = system("du -s /mnt/hdd/ | cut -f1") puts var1 or
var1 = exec("du -s /mnt/hdd/ | cut -f1") puts var1
but system return 0 or 1 if command is failed or succesful, and exec don't
assigne the output to variable var1.
Can you help me? Thanks in advance.
Hello guys!
I am a newbie in ruby and i have a question. I run a system command and i
want that the ouput of that command to be assigne to a variable, something
like this:
var1 = system("du -s /mnt/hdd/ | cut -f1") puts var1 or
var1 = exec("du -s /mnt/hdd/ | cut -f1") puts var1
but system return 0 or 1 if command is failed or succesful, and exec don't
assigne the output to variable var1.
Can you help me? Thanks in advance.