Hacker News new | ask | show | jobs
by chias 1084 days ago
This doesn't work. Try setting up a test directory as follows:

    touch first$'\n'file
    touch .hidden$'\n'file
    mkdir folder$'\n'.
    touch folder$'\n'./another$'\n'file
There are two files in the folder, or three if you want to count files in subdirectories too.

Your solution incorrectly outputs 7.