Modified version of previous demo. Clipbard is cleaned in different way.. The same result, xsel version doesn't work
``` # MAIN pbcopy </dev/null # clear clipboard while :; do TXT="$(pbpaste)" if [ -n "$TXT" ]; then echo "$TXT" pbcopy </dev/null # clear clipboard else sleep 0.1 # sleep 100ms fi done ```
Modified version of previous demo. Clipbard is cleaned in different way.. The same result, xsel version doesn't work
```
# MAIN
pbcopy </dev/null # clear clipboard
while :; do
TXT="$(pbpaste)"
if [ -n "$TXT" ]; then
echo "$TXT"
pbcopy </dev/null # clear clipboard
else
sleep 0.1 # sleep 100ms
fi
done
```