I have several environment file, which end with .env. I want to find them in existing on the same directory shell scripts. I do
for i in [ ls -1 *env ] do grep $i *.sh >> ttt done
It shows me the following errors:
grep: RE error 49: [ ] imbalance.
grep: illegal option -- 1
Usage: grep -hblcnsviw pattern file . . .
Could you please tell me where is my mistake?