Post History
Is this what you want? Edit: Credit to Kamil Maciorowski for catching an unsafe interpolation in the previous draft; it will work for non-adversarial inputs but this newer version is safer and a ...
Answer
#2: Post edited
- Is this what you want?
```find l1 -mindepth 2 -maxdepth 2 -type d \! -empty -exec sh -c "printf '%s' '{}'/* | head -n 3" \;- ```
- Is this what you want?
- **Edit:** Credit to Kamil Maciorowski for catching an unsafe interpolation in the previous draft; it will work for non-adversarial inputs but this newer version is safer and a better example to learn from.
- ```sh
- find l1 -mindepth 2 -maxdepth 2 \
- -type d \! -empty \
- -exec sh -c 'printf "%s
- " "$1"/* | head -n 3' _ {} \;
- ```