[Omaha.pm] Find all files containing '</td>\n</tr>\n</table>'

Jay Hannah jhannah at omnihotels.com
Wed Aug 24 12:21:12 PDT 2005


From: Kenneth Thompson
> Isn't this the same as 
> 
> fgrep -drecurse "</td>\n</tr>\n</table>" *
> 
> ?

Apparently not...

$ find ./ | perl j.pl
./Web/lib/Waitlist/header.entry.html
./Web/lib/Waitlist/header.report.html
./Web/lib/Perseus/debug.AvailResp
./Web/lib/Perseus/Reports/header.Reports.html
./Web/lib/Procurement/header.admin.html
./Web/lib/column_title.html
./Web/lib/Rewards/header.billing.html
./Web/lib/Surveys/header.admin.html
./Web/lib/SessionControl/record.travelagent.html
$ fgrep -drecurse "</td>\n</tr>\n</table>" *
j.pl:  print "$_\n" if ($file =~ m#</td>\n</tr>\n</table>#);
grep: Web/lib/FG/Guest/.detail.SG6_1_4.html.swp: Permission denied
grep: Web/cgi-bin/secure/.grl.pl.swp: Permission denied

Before writing that little Perl thingy I first tried grep -E, but it didn't see "\n" as newline... -shrug-

j



More information about the Omaha-pm mailing list