Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'awk, sed, Perl, etc.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
awk, sed, Perl, etc.
Authored by: victory on Aug 09, '02 06:32:11PM
What a nice series of improvements. I suppose I should have titled the submission as 'Remove multiple chars from filenames with awk one-liners' or something. I actually do most of my day-to-day work in Perl and C, but thought it would be fun to try and accomplish the task using sed/awk simply because: 1] It was a chance to mess with two tools that I haven't used much. 2] I like one-liners. Sometimes it's fun to see how much you can get away with at the shell prompt without resorting to writing a separate script/app.

Perl is quite a nifty language (you can still write one-liners. I particlarly like eisforian's example posted above) and one of the informal themes of Perl is there are usually several, equally valid ways of accomplishing a task (TMTOWTDI). As for learning the Perl language, I echo the earlier suggestion: Any of the O'reilly books is a good place to start. A collection of 5 O'reilly Perl books is also available on CD-ROM. A bit expensive, but it 's a nice way to have the references available at all times. (I got tired of lugging my printed copies back and forth from work, or invariably not having around when I needed to look something up)

[ Reply to This | # ]