Using this simple pastebin test string, why would the last example using a regex pattern seen here give me two blank lines in comparison to the other two? I would expect to see the same result as example1. Note, the only change from example2 to example3 is the switch from option -l to option -n.
**example1**
$ grep -rnw html5uploader
views/layouts/test.ctp:49: src="/js/jquery.html5uploader.min.js<?=$no_cache?>">
views/layouts/test.ctp:52: $("#screenshot").html5uploader(
**example2**
$ grep -rlw .*html5uploader.*
views/layouts/test.ctp
**example3**
$ grep -rnw .*html5uploader.*
(empty line)
(empty line)
The pastebin contents for file "test.ctp":
<!--
<input type="file" name="screenshot" id="screenshot" multiple />
<script type="text/javascript" src="/js/jquery.html5uploader.min.js<?=$no_cache?>"></script>
<script type="text/javascript">
// File upload
$("#screenshot").html5uploader(
{
name: "screenshot",
postUrl: "/bugs/ajax_upload_files"
});
</script>
--> </body>
</html>
grep -rlw '.*html5uploader.*'
. Without the quotes it is subject to both word splitting and pathname expansion and these are frequent causes of unwanted surprises.