I have data in below format in a file.
name,path:A:B
loc:D
name,for:B:C
I need to add " ," (space + comma ) at start of all those lines which doesn't have , in it in the file to get the output like below.
name,path:A:B
,loc:D
name,for:B:C
grep "[^,]" file .. This gives me list of lines which doesnt contain , but I am not able to add at start .