#!/bin/bash # # Removes file whose name ends in ~ stored in the current directory # or in the selected one # # Copyright (C)2007 Giulio Bai # http://hewle.com/giulio/ # # Distributed under the terms of the GNU General Public License # # Path identification by Chris Picton and Christophe Combelles base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`" if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then dir="$base" else while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done dir="$base/$1" fi rm -f $base/*~