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.
#!/bin/bash find *.txt | wc -l;
这给出了 txt 文件的数量。在我的程序中,如何将此输出放入变量中,例如“count”
#!/bin/bash count=$(find *.txt | wc -l)