/usr/bin/getclip | /usr/bin/tail -n +4 | /usr/bin/sed -e '/^-\+$/d;s/^| *//;s/ *|$//;s/ *| */\t/g' | /usr/bin/putclip # Convert table put in clipboard by sap into tab-separated table pastable in excel # By Ginko, 28/10/2014 # Explanation : # Get clipboard content # Get lines starting at forth one (= deletes header information) # Delete lines composed uniquely of dashes # Remove leading and trailing pipes # Replace separating pipes (and spaces) by tabs # Put content back in clipboard