#!/bin/sh # # clipboard : macOS Bash script to help with copying files to the clipboard # OSASCRIPT=$(which osascript) FILE=$1 # Need a file to work on if [ $# -ne 1 ]; then echo "Usage: $0 " exit fi $OSASCRIPT \ -e 'on run args' \ -e 'set the clipboard to POSIX file (first item of args)' \ -e end \ $FILE echo "$FILE copied to clipboard."