11 lines
No EOL
229 B
Bash
Executable file
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 |