#!/bin/bash # # Usage: tetherball # # Display images taken with tethered remote camera # # Copyright (c) 2008, Matthew Botos (http://matthewbotos.com) # Released under the GPL license # http://www.gnu.org/copyleft/gpl.html dir=~/Pictures/Canon last="" echo Waiting for photos... echo Press Control-C to exit while [ true ]; do new=`ls -rt "$dir"/*.JPG 2> /dev/null | tail -1` if [[ $new != "" && $new != $last ]]; then last=$new open $last fi sleep 1 done