output=`dmesg | grep hda`
# becomes
p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
output = p2.communicate()[0]
content[n] = element.content
api[element.api].forEach(function (apiElement, n) {
content[n] = {};
for (var i in element.content) {
content[n][i] = element.content[i];
}
content[n].content = apiElement;
});