Tuesday, August 30, 2016

Ruby: Print Out Multiple Lines

Command:

$ printf "1,name1,address1\n2,name2,address2" | ruby -e "while status = STDIN.gets do = STDIN.gets do
print status
end"


Result:

1,name1,address1
2,name2,address2