From: Josef Weidendorfer Date: Wed, 12 Oct 2005 13:14:22 GMT Subject: Re: cg-mv Message-ID: <200510121514.22276.Josef.Weidendorfer@gmx.de> In-Reply-To: <20051012100757.GM30889@pasky.or.cz> On Wednesday 12 October 2005 12:07, Petr Baudis wrote: > so it should keep the file under the original name as well, but > untraced? That's weird. What about > > #!/usr/bin/env bash > > if [ -e $2 ]; then > ! got_parameter -f && die "dest exists" > [ -e $1 ] || die "no source nor destination" > fi > ( [ -e $1 ] && mv $1 $2 ) && cg-add $2 && cg-rm $1 > > plus quoting and stuff? Wishlist... Please make it similar to mv: * Rename directories, too * If last argument is an existing directory move given files/directories into that directory Josef