0

I want to search in some text for words from list saved as file: merged.failed. Then I want to redirect the output of this command to file

cat merged.failed | while read f; do grep -io $f /home/some/path/some.txt; done | sort > merged.failed

When I do so the merged.failed file becomes empty. However, wihotut > merged.failed the correct output prints

superuser
  • 71
  • 8

0 Answers0