On 4/9/07, <b class="gmail_sendername">Stephen</b> <<a href="mailto:stephen-d-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org">stephen-d-bJEeYj9oJeDQT0dZR+AlfA@public.gmane.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I often need to do utility programs to, for example, extract email<br>addresses from a text file.</blockquote><div><br>That's the kind of thing that awk, sed and Perl are very good at. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I used to use OS/2 REXX and it was great and fast.</blockquote><div><br>REXX is a lot like shell programming .. while it's possibly to do lots of cool things with shell, it's not extensible and tough to debug. <br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What would be a good choice to use on my Linux system?</blockquote><div><br>Depending on how complicated the scripts are going to get, it's a toss-up between awk, sed and Perl. I haven't used sed much, but it's very good at grabbing stuff and displaying what you want. awk is a little more involved, but works very well. Perl might be overkill for just searching through a file for E-Mail addresses, but you can use it in so many other areas of Systems Administration and Software Development.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I know Pascal well, C fair and PHP pretty well.</blockquote><div><br>I would stay away from the compiled languages unless run-time speed is paramount. I don't know PHP well enough to comment on how well it might extract E-Mail addresses from a file, but I'm guessing that sed or awk would be a better choice.
<br></div></div><br>-- <br>Alex Beamish<br>Toronto, Ontario<br>aka talexb