notes/scripts/bslash
2023-12-07 11:31:57 -08:00

11 lines
No EOL
229 B
Bash
Executable file

#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: bslash <file>"
exit 1
fi
# Read the file line by line and append a backslash to each line
while IFS= read -r line; do
echo "$line\\"
done <"$1" | xclip -sel clip