@neil I was never really into sed & awk. Always preferred to use Python for tasks like this. But good to see how you solved it.
Sorry, you cannot view this.
Replies:
3
@neil In case your filenames ever contain spaces, tabs, or backslashes (any of which can mess up your while read loop), I recommend a different idiom:
while read -r; do rm -- "$REPLY"; done <both.txt
(The added -- is technically redundant here because the filenames come from find, so there is no chance of an initial - appearing in any filename.)
Alternatively:
xargs -d '\n' rm <both.txt