--xs+9IvWevLaxKUtW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable George (geoflorida2000 / yahoo.com) wrote: > I want to write command line Ruby program whose arguments will be a > list of words to be found within all HTML documents of the current > directory. The output of the program will be a text file called > results.txt and will consist of a list of all HTML documents in which > one of the words appeared. Have the program create a subdirectory > called FINAL ,of the current directory and save results.txt there. > Finally, it will make duplicate copies of each of the files listed in > results.txt within the FINAL directory. > Any help would be greatly appreciated > George system(%q!sh "list='word1 word2 ...'; mkdir -p FINAL; for a in list; do for f in *.html; do grep $a $f >/dev/null && echo $f >> FINAL/results.txt &&p $f FINAL; done; done"!) I think -- Eric Hodel - drbrain / segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --xs+9IvWevLaxKUtW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE99obaMypVHHlsnwQRAlZsAKDQ9wnbLTUksoMKA0Bj1JRkXKXivACcD636 UeV8bXTCAjkdC4Hbfi7gUfMOn -----END PGP SIGNATURE----- --xs+9IvWevLaxKUtW--