Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 dup(或 dup2)实现重定向,换句话说,如何执行sort < in.txt > out.txt. * 不允许创建像 (bin/sh/) 这样的新 shell 的系统调用。
sort < in.txt > out.txt