Put this in the command complete with text, it will add everything that is on the clipboard to the end of all the selected lines:
#!/bin/bash
if [[ $(pbpaste|wc -l) -eq 0 ]]
then r=`pbpaste`
sed 's/$/'$r'/'
else sed 's/$/,/'
fi
, , .
Edit:
, , , , ββ :
#!/bin/bash
r=$(CocoaDialog inputbox --title "String to be appended to EOL" \
--informative-text "Enter string:" \
--button1 "Okay" --button2 "Cancel")
[[ $(head -n1 <<<"$r") == "2" ]] && exit_discard
r=$(tail -n1 <<<"$r")
sed "s/$/$r/"