PS-I understand the theory of for loops.....actually writing my own
has been a bit of a jump though! I've been playing with a script I
received from someone else

#!/bin/bash
IFS="
"
for i in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
do
	if [ -d "$i" ]
	then
		tar -cf "${i##*/}.tar" "${i##*/}"
		# tar -cf "${i##*/}.tar" "${i}"          Originally used this, but
was definately the wrong choice. I needed to undo all the tar's I'd
made using this first line instead of the above one.
	fi
done

Been playing with the Nautilus scripts folder as well, it's wonderful
being able to point-click files and run custom scripts on them. Thanks
for all your input, and so quickly on a Sunday. God bless

                   -jordan


On 2/26/06, Jordan Peacock <hewhocutsdown at gmail.com> wrote:
> This solution worked like a charm (I knew no files would be
> overwritten, and that I had .tars in several subdirectories)
>
> Just curious if I'm reading this right though. I've looked through the
> find man page, and nowhere did I see this '.' What is the period's
> significance with this operation? and why does it close {}\;  ?
>
> Thank you so much
>
>                  -jordan
>
> On 2/26/06, Ed Wilts <ewilts at ewilts.org> wrote:
> > On Sun, Feb 26, 2006 at 08:36:39AM -0600, Jordan Peacock wrote:
> > > Quick question: I have a whole ton of .tar files I need to extract,
> > > but when I try 'tar -xvf *.tar' it doesn't work.... what am I doing
> > > wrong?
> >
> > Try:
> >
> > find . -name '*.tar' -exec tar xvf {} \;
> >
> >         .../Ed
> >
> > --
> > Ed Wilts, RHCE
> > Mounds View, MN, USA
> > mailto:ewilts at ewilts.org
> > Member #1, Red Hat Community Ambassador Program
> >
>