1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/bash first=1 for i in $* ; do if [ $first -eq 1 ] ; then first=0 else echo -n , fi echo -n "'$i'" done echo