UNIX command output in csv format

I'm just wondering is there any way to capture the output of a unix command in a csv format.

df -h gives the result of filesystem,free space,Used space, use %,mounted on.
Is there a way to capture the command output and format it as comma sparated or fixed length file.

Pipe the standard output of the df -h command to sed and replace spaces with comma.
ex: (korn shell)

df -h | sed 's/ */,/g' >out.csv

I hope it would help

I have tried your syntax and I'm getting comma after every character. Below is the result

 
,F,i,l,e,s,y,s,t,e,m,S,i,z,e,U,s,e,d,A,v,a,i,l,U,s,e,%,M,o,u,n,t,e,d,o,n,
,/,d,e,v,/,m,a,p,p,e,r,/,v,g,0,0,-,l,v,o,l,3,
df -h | sed 's/  */,/g' >out.csv
# sed rule is two spaces and *