Not able to suppress the error message using /dev/null Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Not able to suppress the error message using /dev/null without wasting too much if your time.

The question is published on by Tutorial Guruji team.

Not sure why I am not able to suppress the error message after using /dev/null 2>&1

$ ll /home/harry/workbook/smoel | grep xyz > /dev/null 2>&1
ls: cannot access /home/harry/workbook/smoel: No such file or directory

Answer

The error comes from ls, not grep.

ll /home/harry/workbook/smoel 2>/dev/null | grep xyz
We are here to answer your question about Not able to suppress the error message using /dev/null - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji