Re: find / grep to list files with php's short_open_tag

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

 



On Wed, May 08, 2013 at 11:23:34PM -0430, Patrick O'Callaghan wrote:
> On Tue, 2013-05-07 at 19:41 +0200, Reindl Harald wrote:
> > find /data/www/ -type f -name \*.php -exec grep -l -i -n -F "<?\n" '{}' \;
> > is expected to find any file with "<?" followed directly by a linebreak
> > but that does not work and if someone finds google empty it was me :-(
> 
> Not sure if "\n" is allowed, but why not use $ for end of line as in
> most regular expressions?

Reindl is using fgrep (implied by the -F flag), so I would think \n is
interpreted literally.  I would agree with your suggestion to use 

  $ grep -E "<?$"

Another recommendation would be to use -print0 and pipe to xargs -0.
Using the -exec flag for something like this might be significantly less
efficient.

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux