[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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