awk '{ if( $0 !~ "^-" && length($0) ) { if ( set == 0 ) { printf "%s", $0; set = 1 } else { set = 0; printf ",%s\n", $0 } } }' filename