5 lines
234 B
Bash
Executable file
5 lines
234 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
tmp="$(xsel)" # primary -> tmp (stripping any trailing newlines)
|
|
xsel -b | xsel -i # clipboard -> primary
|
|
printf '%s' "$tmp" | xsel -bi # tmp -> clipboard (without adding a newline)
|