[GRLUG] bash scripting help

Bob Kline bob.kline at gmail.com
Sun Jul 18 15:49:57 EDT 2010


Re the "wait" part, it will wait.

Put it in the background, with a &,
and it won't of course.

    -- Bob


On Sun, Jul 18, 2010 at 3:45 PM, <topher at t1kdevelopment.com> wrote:

> This is only kind of bash scripting help.  Mostly I need help referring to
> other programs properly.  Here's what I want to do.
>
> There's a new user on my machine, and I want to get a new wordpress package
> and unpack it in their dir.  Getting it is easy,
> wget http://wordpress.org/latest.tar.gz
>
> That would drop that tarball in the dir in which I'm running the script,
> right?  I'm ok with that.
>
> Since I don't have perms on the other user's account, I'll be running this
> script as root.
>
> So, once the file is in my home dir, I want to unpack it.  man tar tells me
> this should work:
>
> tar xvzf latest.tar.gz -C ~username/public_html
>
> Does that make sense?
>
> Then I can set permissions on that new stuff, and remove latest.tar.gz
>
> A couple questions:
>
> Will my script wait until my wget is done before trying to do the next
> thing, or should I pause for a while?
>
> Is -C the best way to unpack it in a remote dir, or is there a better way
> to specify a destination?
>
>
>
> Topher
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20100718/4fd4677e/attachment.html>


More information about the grlug mailing list