#!/bin/bash set -e dev=/dev/usb/lp0 # Cut paper at about 15mm, the distance between the cutter and the printer printf '\x1DVA\xc8' > $dev