打开终端 第一步:cat > count 第二步:wc s.sh (s.sh是之前编好的文件) 以Ctrl + D结束输出 第三步:chmod +x count 第四步:./count 转载于:https://www.cnblogs.com/sxmcACM/p/4019684.html