I like this construct for searching through files in a directory and pulling out part of a line.
Just add the regular expression. The '?' designates a non-greedy expression, which means the finite statement machine will quit on the first successful match.
find . -name "*.xml" | xargs perl -ne '/(.*?)"/; print $1; print "\n";'
Showing posts with label Perl. Show all posts
Showing posts with label Perl. Show all posts
Wednesday, September 30, 2009
Subscribe to:
Posts (Atom)