#!/bin/sh pager() { # st -e tail -F -n +1 "/tmp/pages-$1" st -e less "/tmp/pages-$1" } pdf() { st -e zathura "/tmp/pages-$1" } case $1 in pager) pager "$2";; pdf) pdf "$2";; esac