aboutsummaryrefslogtreecommitdiff
path: root/pst
blob: dd6bd6484f9374f667dcfcfbc081f968e1db7fe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

d=
while getopts d o
do
	case $o in
	d) d=1 ;;
	?) echo usage: $0 [-d] [suffix] 1>&2; exit 1 ;;
	esac
done
shift $((OPTIND-1))
s=$1

test ! -e /tmp/cpy"$s" && { echo clipboard not present 1>&2; exit 1; }
cat /tmp/cpy"$s"
test ! -z "$d" && rm /tmp/cpy"$s"
return 0