# On OSX you cannot use for tab. # Instead cntrl+v then insert a literal tab after s/ sed 's/ /,/g' input_file > output_file