here's the slightly longer single line tool I use to clean up and paste text from a PDF (this was an enormous time-saver for me in its atom package form):
xclip -o -selection clipboard | tr '[\n\r]' ' ' | sed -E -e "s/- //g" -e "s/[ \t]*$//" -e "s/[\"\“\”]|[\’\‘]+/\'/g"