Artificial intelligent assistant

Command ls | grep showing only directories ( when it should also show files) In linux, I have a files contains, amongst other, lots of files and directories containing the literal "scrap". I can see them by typing `ls *scrap*` without problem. However that returns also directories containing the literal "scrap" and i would like to exclude those. I tried playing around with `ls | grep ".*scrap.*"` or `ls | grep scrap` but this returns only the directories (not the normal files). Why is this so? The next step will be (once the rep returns the correct output) to remove the directories from that output. Suggestions on how to do that are also welcomed!

Actually, to eventually list all regular files in the current directory (on the 1st level) which have `scrap` in their names, you don't need `ls` \+ `grep`.

With old good **`find`** command:


find . -maxdepth 1 -type f -name "*scrap*" -ls

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ab1e94c192fa567d7d0ab02a2c76b32c