Ruby なら、CSV モジュールを使う

require 'csv'

options = { col_sep: ":" } # 列区切り文字

CSV.foreach( "input.csv", options ) do |row| # 1行ずつ処理する
p row
end

出力
["root", "x", "0", "0", "root", "/root", "/bin/bash"]
["user01", "x", "500", "500", nil, "/home/user01", "/bin/bash"]