Skip to content

Instantly share code, notes, and snippets.

@eddyb
Last active Nov 30, 2016
Embed
What would you like to do?
#!/usr/bin/env bash
SED_SCRIPT=`echo '{\
s/_\\$/$/g;\
s/\\$BP\\$/\&/g;\
s/\\$SP\\$/\@/g;\
s/\\$LT\\$/</g;\
s/\\$GT\\$/>/g;\
s/\\$LP\\$/(/g;\
s/\\$RP\\$/)/g;\
s/\\$RF\\$/\\&/g;\
s/\\$C\\$/,/g;\
s/\.\./::/g;\
s/\\$u20\\$/ /g;\
s/\\$u27\\$/'\''/g;\
s/\\$u3b\\$/;/g;\
s/\\$u5b\\$/[/g;\
s/\\$u5d\\$/]/g;\
s/\\$u7b\\$/{/g;\
s/\\$u7d\\$/}/g;\
s/::h[a-f0-9]{16}[a-zA-Z0-9]*(::v[0-9]+.[0-9]+(pre)?)?//g\
}' | tr -d '\n'`
cat $* | sed 's/E\./E \\$PLACEHOLDER\\$ ./g' | c++filt | sed 's/ \\$PLACEHOLDER\\$ //g' | sed -r "$SED_SCRIPT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment