notes/scripts/bslash
2023-12-07 04:53:27 -08:00

12 lines
No EOL
166 B
Bash
Executable file

#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: bslash <file>"
exit 1
fi
input=$(cat "$1")
output="${input//$/$\\}"
echo "$output" | xclip -sel clip