如何在cd -不回显任何输出的情况下运行命令? 我试过了,cd - 2>&1 /dev/null但这会打印出目标目录。 这样做的原因是我想将它用作 bash 函数,并且我不想有不必要的输出。
cd -
cd - 2>&1 /dev/null
bash
bash ×1