我有一个程序输出到stdout,并希望在管道到文件时在Bash脚本中静音该输出.
例如,运行程序将输出:
% myprogram % WELCOME TO MY PROGRAM % Done.
我希望以下脚本不向终端输出任何内容:
#!/bin/bash myprogram > sample.s
bash
bash ×1