In comp.os.linux.advocacy, Roy Schestowitz
<newsgroups@xxxxxxxxxxxxxxx>
wrote
on Wed, 22 Feb 2006 17:25:13 +0000
<dti6si$rti$1@xxxxxxxxxxxxxxxxx>:
> __/ [ The Ghost In The Machine ] on Wednesday 22 February 2006 17:00 \__
>
>> In comp.os.linux.advocacy, Roy Schestowitz
>> <newsgroups@xxxxxxxxxxxxxxx>
>> wrote
>> on Wed, 22 Feb 2006 06:17:33 +0000
>> <dtgvoj$8eo$1@xxxxxxxxxxxxxxxxx>:
>>> http://www.opentechsupport.net/forums/archive/topic/20438-1.html
>>
>> Shit! Too complicated! Where's my GUI? Where's the
>> ease of use? I wanna mouseclick! WAAAAAH!
>>
>> - hypothetical response from a frustrated Windows user
>>
>> ;-)
>>
>> There are a fair number of additional pipelining options,
>> however -- date in particular can print an arbitrary format.
>> But that's what manpages are for. :-)
>
> Here's one of my latest script:
>
> cd /tmp/ # need full path for cron
> rm -rf /home/roy/public_html/wordpress #
> wget http://static.wordpress.org/builds/wordpress-`date +%Y-%m-%d`.tar.gz
> rm /tmp/wordpress-`date +%Y-%m-%d`.tar # delete
> gunzip /tmp/wordpress-`date +%Y-%m-%d`.tar.gz
> tar xf /tmp/wordpress-`date +%Y-%m-%d`.tar # uncompress and untar
> cp -rf /tmp/wordpress /home/roy/public_html/ # overwrite old files
> rm -rf /tmp/wordpress # clean up
>
> Without using semi-colons, it could still be shrunk to occupy just 4 lines
> or so. What does it do? It goes to the WordPress site, it finds the latest
> nightly build, it then downloads it, uncompresses the file, extracts all
> the files, puts them on a public Webspace and optionally protects every-
> thing.
>
> Imagine yourself doing all of this in Windows rather than let a cron job
> keep the Web-based software up-to-date, /without/ having /any/ such func-
> tionality at software-level.
>
> The command-line gives power. If the newbie does not want to be efficient,
> (s)he can use the GUI. It's there, so use it. It has become a streotype
> and a fallacy: Linux users choose the command-line, so the command-line
> must be vital. If you want to burn CD's with nightly copies of your Web
> sites and then open the CD tray in the morning, script it. *Once*. OR
> click your way through life instead. Day, by day, by day...
>
> Roy
>
I'd put those `date...` as a single variable setting (just in case
you run it near midnight! :-) ) but otherwise, yes, that's the general
idea; scripting is very flexible.
Semicolons and newlines are more or less interchangeable anyway,
as far as command termination is concerned.
--
#191, ewill3@xxxxxxxxxxxxx
It's still legal to go .sigless.
|
|