-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This should work (untested!):

for x in $(find <YOUR-DIR-WITH-HTML-FILE> -name "*.htm*"); do
~  tmp=$(mktemp);

~  sed 's/VV, ppp-ppp/81, 51-67/' $x > $tmp && mv $tmp $x;

~  rm $tmp;
done

Matthew R. Lee schrieb:
| I have a folder full of .html files and I need to go through and replace in
| each and every one of them a couple of bits of info. I know I can do this
| using the following from the command line:
| sed 's/VV, ppp-ppp/81, 51-67/' file.html > newfile.html | mv newfile.html
| file.html
| Problem is I need to do this on nearly 200 files.  I assume it could be done
| with a script, but I have zero experience in writing scripts.  I've looked
| through a few how-to's but haven't found anything I understand sofar.  I want
| to learn how to script, but my Prof want's this done yesterday as the
| associated paper has just been published.
| Cheers
| Matt

- --
Johann Schmitz
http://www.j-schmitz.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkgYl40ACgkQZsUt7MqpQk0B4ACfdSv5T9h3kd45vseh3vKg5vun
ga4AoKL6nnAiobGsWIwHgND7DChxUNy6
=ESvU
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list

Reply via email to