The bash file:
#!/bin/bash
grep -l -r "products" Products/
gives output
: No such file or directory
When run directly from the terminal prompt, grep -l -r "products" Products/
gives the desired output, which is the list of files containing the word.
I checked using echo $SHELL
that the shell is indeed bash
so there should be no difference. What could be the reason? (Products/
directory contains around 3500 files).
Running on Ubuntu 12.04 LTS.