rm, a command that doesn't read stdin. Wrong command or
missing xargs?ls | echo                      # Want to print result
cat files | rm                 # Want to delete items from a file
find . -type f | cp dir        # Want to process 'find' output
rm file | true                 # Want to ignore errorsls
cat files | while IFS= read -r file; do rm -- "$file"; done
find . -type f -exec cp {} dir \;
rm file || trueYou are piping to one of several commands that don't read from stdin.
This may happen when:
echo
where cat was intended.| on the previous
line.xargs, because stdin should be passed as
positional parameters instead (use xargs -0 if at all
possible).|| instead of |Check your logic, and rewrite the command so data is passed correctly.
If you've overridden a command to return output, you can either rename it to make this obvious, or ignore this message.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.