View Single Post
Old May 3rd, 2006, 7:37 AM   #4
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
#!/bin/ksh
for file in `ls -1 *.html`
do
    newname=$(perl -e ' 
               undef $/;
               $text=<>;
               $text~="{([A-Za-z ]+)</font>$}";
               print "$1"; ' "$file" )
    mv "$file" "$newname"
done

Corrected two minor syntax errors - sorry.
jim mcnamara is offline   Reply With Quote