#!/bin/sh if [ -z "$1" ]; then echo "Enter a valid image with QR code" else zbarimg -q $1 | cut -b 1-8 --complement | xclip -o -sel c; ##use in command line argument like ##qrscan "image" | xclip -sel c -o because ## ERROR: target STRING not available ## xclip -o outputs current clipboard... ## xclip -i flag standard input fi