HighDots Forums  

Mass Changes

alt.html.tags alt.html.tags


Discuss Mass Changes in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Matt Probert
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 12:50 AM






On Tue, 08 Jun 2004 21:24:31 +0100 Toby A Inkster
<tobyink (AT) goddamn (DOT) co.uk> broke off from drinking a cup of tea at
goddamn.co.uk to write:

Quote:
Matt Probert wrote:

On the other hand, something similar could be written in a few lines
of Perl and posted here. Okay last to post the (quick and dirty) Perl
solution is a sissy! <g

Is two lines (excluding shebang) too many? I can do it in one if I'm
allowed to change the order of the arguments to STRING, REPLACEMENT,
FILESPEC.

#!/usr/bin/perl
$a = shift @ARGV;
system("sed -i 's/" . shift @ARGV . '/' . shift @ARGV . "/g' $a");

(Very dirty. Won't work for some STRINGs -- anything that has a special
meaning in a regexp.)

Will that work under Windows? Looks to me like it's calling an
external program - 'sed'.

Matt

--
Free searchable encyclopaedia content for your web site:
http://www.probertencyclopaedia.com/xsearch.htm


Reply With Quote
  #42  
Old   
Matt Probert
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 12:51 AM






On Wed, 9 Jun 2004 09:34:16 +1000 Mark Parnell
<webmaster (AT) clarkecomputers (DOT) com.au> broke off from drinking a cup of
tea at to write:

Quote:
On Tue, 08 Jun 2004 13:15:12 GMT, Matt Probert
comments (AT) probertencyclopaedia (DOT) com> declared in
alt.html,alt.html.tags,alt.www.webmaster:

English language, it's richness and complete lack of logic!
^
And its wayward apostrophes! :-D

Touche!

I always think (well sometimes) that "its" should have an
apostrophe...I know, I know...

Matt



Reply With Quote
  #43  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 01:43 AM



Matt Probert wrote:

Quote:
Will that work under Windows? Looks to me like it's calling an
external program - 'sed'.
'sed' is available for Windows.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132



Reply With Quote
  #44  
Old   
Charles Sweeney
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 04:18 AM



"Matt Probert" <comments (AT) probertencyclopaedia (DOT) com> wrote

Quote:
On Wed, 9 Jun 2004 09:34:16 +1000 Mark Parnell
webmaster (AT) clarkecomputers (DOT) com.au> broke off from drinking a cup of
tea at to write:

On Tue, 08 Jun 2004 13:15:12 GMT, Matt Probert
comments (AT) probertencyclopaedia (DOT) com> declared in
alt.html,alt.html.tags,alt.www.webmaster:

English language, it's richness and complete lack of logic!
^
And its wayward apostrophes! :-D


Touche!

I always think (well sometimes) that "its" should have an
apostrophe...I know, I know...
Me too, because you were talking about the richness belonging to "it". So
it should be "it's" richness!

I had "it's" (in the possessive sense we are discussing here) on a website.
Some stuffy guy emailed to point it out, which I then changed. It happens!
--
Charles Sweeney
www.CharlesSweeney.com




Reply With Quote
  #45  
Old   
Matt Probert
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 04:47 AM



On Wed, 9 Jun 2004 10:18:29 +0100 "Charles Sweeney"
<me (AT) charlessweeney (DOT) com> broke off from drinking a cup of tea at to
write:

Quote:
Touche!

I always think (well sometimes) that "its" should have an
apostrophe...I know, I know...

Me too, because you were talking about the richness belonging to "it". So
it should be "it's" richness!
That's exactly my argument. I'm not a linguist, I don't trace the
roots of words to argue their correctness, I'm a writer.

Matt



Reply With Quote
  #46  
Old   
John Bokma
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 01:23 PM



Matt Probert wrote:

Quote:
On Tue, 08 Jun 2004 21:24:31 +0100 Toby A Inkster
tobyink (AT) goddamn (DOT) co.uk> broke off from drinking a cup of tea at
goddamn.co.uk to write:

Matt Probert wrote:


On the other hand, something similar could be written in a few lines
of Perl and posted here. Okay last to post the (quick and dirty) Perl
solution is a sissy! <g

Is two lines (excluding shebang) too many? I can do it in one if I'm
allowed to change the order of the arguments to STRING, REPLACEMENT,
FILESPEC.

#!/usr/bin/perl
$a = shift @ARGV;
system("sed -i 's/" . shift @ARGV . '/' . shift @ARGV . "/g' $a");

(Very dirty. Won't work for some STRINGs -- anything that has a special
meaning in a regexp.)

Will that work under Windows? Looks to me like it's calling an
external program - 'sed'.
sed is available for Windows :-D.

http://gnuwin32.sourceforge.net/, see
http://gnuwin32.sourceforge.net/packages.html

http://unxutils.sourceforge.net/

Or you can install cygwin.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html


Reply With Quote
  #47  
Old   
Mark Parnell
 
Posts: n/a

Default Re: Mass Changes - 06-09-2004 , 07:28 PM



On Wed, 9 Jun 2004 10:18:29 +0100, Charles Sweeney
<me (AT) charlessweeney (DOT) com> declared in
alt.html,alt.html.tags,alt.www.webmaster:

Quote:
Me too, because you were talking about the richness belonging to "it". So
it should be "it's" richness!
What can I say? English is a stupid language. :-)

Quote:
I had "it's" (in the possessive sense we are discussing here) on a website.
Some stuffy guy emailed to point it out, which I then changed. It happens!
I'd be the stuffy guy who'd notice it, and laugh about it with his
friends, although I wouldn't email you about it. *sigh* I'm such a nerd.

--
Mark Parnell
http://www.clarkecomputers.com.au


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.