I often find myself copying strings of Java stack traces which have escaped tabs and newlines (\t\n). Those aren’t fun to read. Here’s a quick Python script I rigged up to grab what’s on the clipboard and format it properly. I call it unescape:
#!/usr/bin/env python3
'''
Grab the string on the clipboard and print it to standard out,
interpreting tabs and newlines appropriately
'''
import subprocess
r = subprocess.run(["/usr/bin/pbpaste"], capture_output=True, encoding="unicode_escape")
print(r.stdout)