Hi, I have made a script that prints some various things to the screen. In the process the script is doing a loop which searches for certain files in certain directories. The problem comes in when it doesnt find any files. It prints an error to the screen. There must be a way to prevent that! Any help is appreciated.
<font color=blue>- Studies show that the human brain approaches 100 percent retention. -</font color=blue>
It's printing the error message to stderr, not stdout which is what you are capturing. You need to redirect stderr to somewhere other than the screen (eg, /dev/null, or stdout)
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.