Activity for Ed Mortonâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: How to get number of files in directory Populate an array of the file names and then print how many entries are in the array: $ files=( ) $ echo "${#files[@]}" 124 That will work correctly even if your file names contain newlines, unlike anything piped to `wc -l`. (more) |
— | about 1 year ago |