Read lines into an array
low risk
Reads lines from stdin into a bash array — safer than word-splitting command output.
| Flag | Meaning |
|---|---|
-t | Strip trailing newlines |
mapfile -t files < <(find . -name "*.log")Collect results safely · explain & risk-check →Reference text is hand-written and may be incomplete — check man mapfile for your version. Test destructive commands on a non-production system first.