Bash script programming question
cdl at proxima.ucsd.edu
Tue Jun 4 11:23:20 PDT 2002
> Date: Mon, 3 Jun 2002 13:29:34 -0700
> From: Stewart Stremler <bofh at stremler.net>
> To: kplug-list at kernel-panic.org
> Subject: Re: Bash script programming question
> In-Reply-To: <200206031858.AA02872 at proxima.ucsd.edu.UCSD.EDU>
> begin quoting Carl Lowenstein as of Mon, Jun 03, 2002 at 11:58:32AM -0700:
> > Always you are at the mercy of the person who first created the archive
> > file. I myself always examine the archive ( tar -t, unzip -l ) before
> > unpacking it, just to be sure it doesn't splatter files all over some
> > place where they are not wanted.
> I frequently untar/unzip stuff in /tmp, and frequently a dummy directory
> (mkdir /tmp/X; cp foo.tar /tmp/X/; cd /tmp/X; tar xvf foo.tar) so that
> if it does put crap everywhere, I can easily clean it up with globbing.
> > How about merely
> > $ cd some/destination && sh explode.sh ~/downloads/zip/app1
> That would mean you'd have to have explode.sh in some/destination
> Why not chmod a+x explode.sh, and move it to $HOME/bin, and then you
> can just do:
> % cd some/destination && explodes.sh ~/downloads/zip/app1
I had sort of assumed that "explode.sh" would be put in some $PATH
type place. But it's good to state that explicitly.
> > Don't invent a new tool to use infrequently to replace a combination of
> > existing tools.
> Hark to the words of wisdom.
More information about the KPLUG-List