Found a buddy who used something like:
hostname = open("|hostname").gets
I see that it works, but I don’t find any of the documentation that
So – it seems to be IO class, but how? There’s no IO declaration
Also, I can’t find anything that says you can open a command with a
pipe and get the output of the executed command.
I’m familiar with perls open: open(FH, “hostname |”) with a suffixed
which is consistent with unix pipe usage.
But can someone explain to me what’s going on here so my brain doesn’t