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"
- If there are no errors, it prints a "No errors" message to stdout.
- If there are errors, it prints a detailed message to stderr. I want only this one.
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)