7 lines
266 B
Bash
Executable file
7 lines
266 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Somehow, this pipeline ends up with a bunch of newlines at the end that make
|
|
# pasting it annoying. Use sed to remove all trailing newlines.
|
|
#
|
|
# https://stackoverflow.com/a/7359879/2472163
|
|
pbpaste | vipe | sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba' | pbcopy
|