I want to lint a file, and print the stderr (error message), but do not print the stdout (saying the file is OK).
php -l "foo/bar.php"
I figure it will be some magic with >&
, but I never understood how those work.
What I want is to consume all stdout, keep stderr.
(Sorry if this is dulicate, but I haven't found any question exactly about this)
Just send the stdout to null:
cmd > /dev/null
This retains stderr, but suppresses stdout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With