0

This command works:

/usr/bin/scrot -f -scapture -e 'xclip -selection clipboard -t image/png -i $f'

This script does not:

#!/bin/bash

COMMAND="/usr/bin/scrot -f -scapture -e 'xclip -selection clipboard -t image/png -i \$f'"

echo "$COMMAND"

sleep 0.2
$COMMAND 

It reports:

/usr/bin/scrot -f -scapture -e 'xclip -selection clipboard -t image/png -i $f'
scrot: option --select: Unknown value for suboption 'election'

Seemingly using -selection as an option to scrot instead of xclip. I've tried all manner of \ escaping, but nothing changes. What am I missing here?

dave mankoff
  • 101
  • 1

0 Answers0