LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to supress terminal output? (https://www.linuxquestions.org/questions/linux-software-2/how-to-supress-terminal-output-612629/)

RedOctober45 01-10-2008 11:24 AM

how to supress terminal output?
 
Hey guys!

Ok, so I created a very simple ftp bash script to ftp into QNX machine, grab a file and then exit. It works great, however, I want to suppress the response(s) the FTP command sends back to the terminal (stdout), or even better, replace it with my own such as "Retrieving file..." or something of the sort.

Any suggestions/help?

Thanks a lot!

Poetics 01-10-2008 11:32 AM

Simple redirection can remove the messages sent to STDOUT and STERR, as so: "./script.sh 2>&1 > /dev/null"

This runs the script, makes sure that STERR is pointed to STDOUT, and that all output is filed into /dev/null, where it will never see the light of day.

Hope that helps!

RedOctober45 01-11-2008 08:59 AM

Yep! Thank you!


All times are GMT -5. The time now is 08:10 PM.