学生信息管理Word文件下载.docx
- 文档编号:19671966
- 上传时间:2023-01-08
- 格式:DOCX
- 页数:35
- 大小:127.59KB
学生信息管理Word文件下载.docx
《学生信息管理Word文件下载.docx》由会员分享,可在线阅读,更多相关《学生信息管理Word文件下载.docx(35页珍藏版)》请在冰豆网上搜索。
"
20502>
tmp.txt
content=$(cattmp.txt)
IFS="
readsidsnamesin<
unsetIFS
grep-c"
$sid"
$file_name>
menu.txt
sid=$(catmenu.txt)
if["
!
="
0"
];
then
ERROR"
--msgbox"
Recordhasexisted!
2030
else
echo"
$content"
>
$file_name
dialog--title"
ReplyInfo"
Addsuccessfully!
1030
fi
}
insert_c()
/root/aillo/colleges.db"
College:
Pleaseinputthecollege'
sinformationinthesort(cid,cname):
readcidcname<
$cid"
cid=$(cattmp.txt)
3050
delete_s()
{file_name="
Deletearecord"
PleaseinputtheIDofthestudentyouwanttodelete:
readsid<
grep-v$sid$file_name>
mvtmp.txt$file_name
therecordhasbeendelete!
delete_c()
PleaseinputtheIDofthecollegeyouwanttodelete:
readcid<
grep-v$cid$file_name>
display_s()
cat$file_name|whilereadline
do
echo$line>
IFS="
readsidsnamesin<
echo"
sid:
$sid"
t.txt
sname:
$sname"
sin:
$sin"
---------------------"
"
done
content=$(catt.txt)
AllStudents'
Info"
5050
rmt.txt
display_c()
readcidcname<
cid:
$cid"
cname:
$cname"
Allcolleges'
count()
Count"
Pleaseinputtheidofcollegestudentsyouwanttocount:
readp1<
Thereare`grep-c$p1$file_name`studentsinthe$p1college!
change_s()
ModifyStudent'
sInfo"
Pleaseinputthenewinformationyouwanttomodifyinthesort(sid,sname,sin):
readp1p2p3<
grep-v$p1$file_name>
$p1,$p2,$p3"
Theinformationhasbeenmodified!
change_c()
ModifyCollege'
sInfo"
Pleaseinputthenewinformation:
readp1p2<
$p1,$p2"
status=1
dialog--title"
Students'
InfoManageSystem"
\\nWelccometousetheSystem!
\\n"
1035
if[$?
=0];
sleep1
dialog--clear
exit0
fi
while["
$status"
="
1"
]
do
MainMenu"
--menu"
Choices"
152021"
Student"
2"
College"
2>
MY_CHOICE=$(cattmp.txt)
if[$?
sleep1
dialog--clear
exit0
$MY_CHOICE"
StudentInfoManage"
ChooseOperation"
203071"
INSERT"
DELETE"
3"
MODIFY"
4"
COUNT"
5"
DISPLAY"
6"
BACK"
7"
EXIT"
if[$?
sleep1
dialog--clear
fi
choice_2=$(cattmp.txt)
if["
$choice_2"
insert_s
elif["
2"
delete_s
3"
change_s
4"
count
5"
display_s
6"
continue
else
break
CollegeInfoManage"
insert_c
delete_c
change_c
display_c
dialog--yesno"
Doyouwanttocontinue?
1020
=0];
status=1
status=0
done
sleep1
dialog--clear
exit0
注意:
在运行程序之前要先创建students.db和colleges.db这两个文件,不然会出错
运行结果:
(1)欢迎界面和主界面
(2)"
选择操作"
界面
(3)插入一条记录
(4)显示所有的学生/学院信息
(5)删除一条记录
(6)修改记录
(7)经过删除修改后的信息
(8)统计某个学院的学生数
学生成绩管理
viewplaincopytoclipboardprint?
1.##Power
by
oAthEvil
2.##E-mail:
oathevil@
3.##Blog:
4.#!
/bin/bash
5.
6.DIALOG=/usr/bin/dialog
7.TMP="
./tmp/tmp.$"
8.FILE_FACULTY="
./file/Faculty.dat"
9.FILE_STUDENT="
./file/Student.dat"
10.FILE_SCORE="
./file/Score.dat"
11.msg()
{
12.
$DIALOG
--title
Prompt"
--msgbox
$1"
15
30
13.}
14.
15.Insert()
16.
case
in
17.
Faculty)
18.
####
Get
faculty
id
to
be
inserted
19.
--inputbox
Enter
[Faculty
Id]:
6
30/
20.
2>
${TMP}_INSERT_INS
21.
faculty_id=$(cat
${TMP}_INSERT_INS)
22.
Check
If
the
record
of
$faculty
exists
23.
export
n=$(cat
$FILE_FACULTY
|
grep
^${faculty_id},"
wc
-l
tr
-d
)
24.
if
[
x$n"
!
=
x0"
]
||
x$faculty_id"
x"
;
then
25.
msg
Invalid
or
already
exsitance
26.
return
27.
fi
28.
name
29.
Name]:
30.
31.
faculty_name=$(cat
32.
and
inserted
are
valid
33.
x$faculty_name"
34.
35.
36.
else
37.
38.
fi
39.
40.
echo
$faculty_id,$faculty_name
41.
Insert
successfully
42.
43.
44.
rm
-f
45.
46.
Student)
47.
Student
48.
[Student
49.
${TMP}_STUDENT_INS
50.
student_id=$(cat
${TMP}_STUDENT_INS)
51.
52.
$student_id
53.
$FILE_STUDENT
^${student_id},"
54.
x$student_id"
55.
student
56.
57.
58.
59.
60.
61.
student_name=$(cat
${TMP}_STUDENT_INS)
62.
x$student_name"
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
Status]:
77.
78.
student_status=$(cat
79.
80.
x$student_status"
81.
status!
82.
83.
84.
$student_id,$student_name,$faculty_id,$student_status>
85.
suc
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 学生 信息管理