#!/bin/sh -e read pid < "$1" ps $pid > state/ps-out tail -1 state/ps-out