我正在运行一个 bash 脚本,该脚本在cat alphmajors
.显示输出后我是否必须告诉脚本继续?为什么脚本在那行之后暂停?
另外,我预计我当前的脚本会在cat >> 2018Students
通常情况下添加“新学生姓名”,然后按 ctrl+c 退出命令。你能帮助我的脚本吗?
tar -xvf University.tar
cd University/Departments/Majors/
sort m2018 > alphmajors
cat alphmajors
mv alphmajors ..
cd ../../Professors
touch NewHires
cd ../Students/Undergraduate/
cat >> 2018Students
cd ../Graduate/
cat GradStudents >> ../Undergraduate/2018Students
cd ../Undergraduate/
rm -r ../Graduate/
grep "\ S" 2018Students > SNames.txt
cat >> SNames.txt
sed '/myname:/d;1i\myname' SNames.txt