find / grep to list files with php's short_open_tag
Patrick O'Callaghan
pocallaghan at gmail.com
Thu May 9 03:53:34 UTC 2013
On Tue, 2013-05-07 at 19:41 +0200, Reindl Harald wrote:
> am i stupid or grep? :-)
Well I know you aren't grep ...
> find /data/www/ -type f -name \*.php -exec grep -l -i -n -F "<?" '{}' \;
> lists any file which contains "<?" under the path /data/www/
>
> 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?
poc
More information about the users
mailing list