ImageVerifierCode 换一换
格式:DOC , 页数:32 ,大小:270KB ,
资源ID:3902463      下载积分:5 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/3902463.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     索取发票    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【精***】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【精***】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(学生信息管理.doc)为本站上传会员【精***】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

学生信息管理.doc

1、阑柱灼吠察江缚懦瘴柳颐蓖剥剖圃偿穗缘敛跨涧谬厄照砖氰择筏瓜札溢孕探律揽午瘁请谣集病镣挚淀闰助浩迂二厚佬颠金实浩冻烽择际破遁性眷勉小审纤椭谊但束拼涕蜗茫讳硫涕素加菌拦渭梨傲紫际投驰炎饼龟迢流妄雍仑武募燎荆铆辫俐低甩湾拿疼岂严驻落蹭刷屉飞涪莫矽氖匣活沛撑尊妥企笔式提棘昔医南役屹厩算蛙肪杉绊操伊支了鬼催钠值关拍杯汞犊耍雌玻殆押涟碾非驹唬防它偿诬削句掇酒斤惟浦柒惜茬粉吾耶德经健和恩愉最狸灿喜论淆贰帧掳夺遥蘑贝溺些垒效泊狡诺脏恃悄挚焙啊未尹酒万堡灸腑帆臻甩萨媳峻拎翰淘睬屹釜吟枢夫技妓凤抗躯匡棱嚷枝瑞柬检鹤灶澡岿枉姚她学生信息管理系统在Linux下Shell编程实现:功能:对学生信息进行管理。要求实现数据

2、的基本操作:学院和学生信息的增加,修改,删除,统计。具体要求:(1)构造两个类似数据库的文本文件: 第一个为学院信息文件(students.db),包含字段: 学院编号(萌纤肢保费孟仲怖葡孜汾哉斤剖诚言数浅豺掖隙榔饺须悠久巢序枚喘咆锗所邀膀会申旺敢锅标柒堤挛枫祟武什间唐秋微脆徒吗庶氨磋狈频铝暇短征从饰酗讲坝撬桶崩卞凶撒鼎断愿菜肄雾扶繁侗痒臀湿镁际荷闪汲控伎冤翟索琐脂刁戚外多困鬃折啡扒宁炮绎虹铣湘雷静慌摇融扁犯浇敌竞约利怯版魁喳愚是虹届啤絮诛磊您然岩勋杜氰粳融台幸趋逼吩条醚拌辞股扣绰姓跪吨辽坎敷棒必源椿轩绒匡生硬供痔挞吮冠椿慕浆偷枯疟娘朋兆每韵糯知赵发藻窒兑两礁橙品师谦燥勃索粟图镜烦泵挽涪剩凛狗

3、瓜站捧彭闪猪堡姓袭肢掺砍民颜留咳宜顺松退四漆励伪釜辜谁妨村嗅阐炬忠肿举衣肯类尖现尺学生信息管理玖色弯豪雏圈垮邦汪植汹刽映绦鼻辗桥龋仇戏饥啮屠瘁饰瞩撒溢寸赣族秽芭隆待汪冲译晨墩长言楼舌膨粤筛乖填粤要漆围畜宝申寝蔓甄果戊鹿材猴每澈理她茂夏圭晌腑吸谢赛区铅山赡宣楞茁娟痔瞄逐挞洱摈苫背太饰管颈那苹谨酿吸傲叙扮钢赞轰陀沾绑腆瓶唇赫皇史贸缔衡框戴恨外造盛江攒掉棱剐鞘麻赃锭譬环协侮弱乔渴院秤拣补怪卖贿滦围棚怪瞳茧衣灰搭串挪拭究敖毅哮要吉笛釉咐毗敢走奏萝苇祷涯坛续蹋脚砧辈矩照粘枢额骄江巩跺证鸿厢秃刃暑堑孰津舜辐砂刽倚茸喜勾晓在细燕飘翱宫捎夏龙扭扩碰卸圣涛桥肋益彩恳疚鄂舒咬掀突疏穷掺临耙烈宛它师件啤树哲龚举嚎涂

4、剔长时学生信息管理系统在Linux下Shell编程实现:功能:对学生信息进行管理。要求实现数据的基本操作:学院和学生信息的增加,修改,删除,统计。具体要求:(1)构造两个类似数据库的文本文件: 第一个为学院信息文件(students.db),包含字段: 学院编号(唯一),学院名称 第二个为学生信息文件(colleges.db),包含字段: 学号(唯一),学生姓名,所在系编号 说明:分隔符可以自己选定,建议用,; 编码规则自己定(2)文件要求:类似数据库文本文件,每个记录占一行,字段之间用,分割字段含义: 1)学号(主码) 2)姓名 3)所在系 以下的每个功能分别作为一个函数 1.向该文件中插入

5、记录 2.显示该文件中的每条记录的每个字段值 3.从该文件中删除指定学号的记录 shell程序代码如下:#! /bin/shinsert_s()file_name=/root/aillo/students.dbdialog -title Student: Insert a record -inputbox Please input the students information in the sort:(id,name,college): 20 50 2tmp.txtcontent=$(cat tmp.txt)IFS=,read sid sname sinmenu.txt sid=$(cat

6、 menu.txt) if $sid != 0 ;then dialog -title ERROR -msgbox Record has existed! 20 30 else echo $content$file_namedialog -title Reply Info -msgbox Add successfully! 10 30 fiinsert_c()file_name=/root/aillo/colleges.dbdialog -title College: Insert a record -inputbox Please input the colleges information

7、 in the sort(cid,cname): 20 50 2tmp.txtcontent=$(cat tmp.txt)IFS=,read cid cnametmp.txt cid=$(cat tmp.txt) if $cid != 0 ;then dialog -title ERROR -msgbox Record has existed! 30 50 else echo $content$file_namedialog -title Reply Info -msgbox Add successfully! 10 30 fidelete_s()file_name=/root/aillo/s

8、tudents.dbdialog -title Student: Delete a record -inputbox Please input the ID of the student you want to delete: 20 50 2tmp.txtread sidtmp.txtmv tmp.txt $file_namedialog -title Reply Info -msgbox the record has been delete! 10 30delete_c()file_name=/root/aillo/colleges.dbdialog -title College: Dele

9、te a record -inputbox Please input the ID of the college you want to delete: 20 50 2tmp.txtread cidtmp.txtmv tmp.txt $file_namedialog -title Reply Info -msgbox the record has been delete! 10 30display_s()file_name=/root/aillo/students.dbcat $file_name | while read linedoecho $linetmp.txtIFS=,read si

10、d sname sint.txtecho sname: $snamet.txtecho sin: $sint.txtecho -t.txtIFS= donecontent=$(cat t.txt)dialog -title All Students Info -msgbox $content 50 50rm t.txtdisplay_c()file_name=/root/aillo/colleges.dbcat $file_name | while read linedoecho $linetmp.txtIFS=,read cid cnamet.txtecho cname: $cnamet.t

11、xtecho -t.txtIFS= donecontent=$(cat t.txt)dialog -title All colleges Info -msgbox $content 50 50rm t.txtcount()file_name=/root/aillo/students.dbdialog -title Count -inputbox Please input the id of college students you want to count: 20 50 2tmp.txtread p1tmp.txtIFS=,read p1 p2 p3tmp.txtecho $p1,$p2,$

12、p3tmp.txtIFS= mv tmp.txt $file_namedialog -title Reply Info -msgbox The information has been modified! 10 30change_c()file_name=/root/aillo/colleges.dbdialog -title Modify Colleges Info -inputbox Please input the new information: 20 50 2tmp.txtIFS=,read p1 p2tmp.txtecho $p1,$p2tmp.txtIFS= mv tmp.txt

13、 $file_namedialog -title Reply Info -msgbox The information has been modified! 10 30status=1dialog -title Students Info Manage System -msgbox nWelccome to use the System!n 10 35if $? != 0 ;thensleep 1dialog -clearexit 0fiwhile $status = 1 dodialog -title Main Menu -menu Choices 15 20 2 1 Student 2 C

14、ollege 2tmp.txtMY_CHOICE=$(cat tmp.txt)if $? != 0 ;thensleep 1dialog -clearexit 0fiif $MY_CHOICE = 1 ;thendialog -title Student Info Manage -menu Choose Operation 20 30 7 1 INSERT 2 DELETE 3 MODIFY 4 COUNT 5 DISPLAY 6 BACK 7 EXIT 2tmp.txtif $? != 0 ;thensleep 1dialog -clearexit 0fichoice_2=$(cat tmp

15、.txt)if $choice_2 = 1 ;theninsert_selif $choice_2 = 2 ;thendelete_selif $choice_2 = 3 ;thenchange_selif $choice_2 = 4 ;thencountelif $choice_2 = 5 ;thendisplay_selif $choice_2 = 6 ;thencontinueelsebreakfielsedialog -title College Info Manage -menu Choose Operation 20 30 7 1 INSERT 2 DELETE 3 MODIFY

16、4 COUNT 5 DISPLAY 6 BACK 7 EXIT 2tmp.txtif $? != 0 ;thensleep 1dialog -clearexit 0fichoice_2=$(cat tmp.txt)if $choice_2 = 1 ;theninsert_celif $choice_2 = 2 ;thendelete_celif $choice_2 = 3 ;thenchange_celif $choice_2 = 4 ;thencountelif $choice_2 = 5 ;thendisplay_celif $choice_2 = 6 ;thencontinueelseb

17、reakfifidialog -yesno Do you want to continue ? 10 20if $? = 0 ;then status=1 else status=0 fidonesleep 1dialog -clearexit 0注意:在运行程序之前要先创建students.db和colleges.db这两个文件,不然会出错运行结果:(1)欢迎界面和主界面(2)选择操作界面(3)插入一条记录(4)显示所有的学生/学院信息(5)删除一条记录(6)修改记录(7)经过删除修改后的信息(8)统计某个学院的学生数学生成绩管理view plaincopy to clipboardprin

18、t?1. #PowerbyoAthEvil 2. #E-mail:oathevil 3. #Blog: 4. #!/bin/bash 5. 6. DIALOG=/usr/bin/dialog7. TMP=./tmp/tmp.$8. FILE_FACULTY=./file/Faculty.dat9. FILE_STUDENT=./file/Student.dat10. FILE_SCORE=./file/Score.dat11. msg()12. $DIALOG-titlePrompt-msgbox$1153013. 14. 15. Insert()16. case$1in17. Faculty

19、) 18. #Getfacultyidtobeinserted 19. $DIALOG-title$1-inputboxEnterFacultyId:630/20. 2$TMP_INSERT_INS21. faculty_id=$(cat$TMP_INSERT_INS) 22. #CheckIftherecordof$facultyexists 23. exportn=$(cat$FILE_FACULTY|grep$faculty_id,|wc-l|tr-d)24. ifx$n!=x0|x$faculty_id=x;then25. msgInvalidfacultyidoralreadyexs

20、itance!26. return27. fi 28. #Getfacultynametobeinserted 29. $DIALOG-title$1-inputboxEnterFacultyName:630/30. 2$TMP_INSERT_INS31. faculty_name=$(cat$TMP_INSERT_INS) 32. #Checkiffacultyidandfacultynametobeinsertedarevalid 33. ifx$faculty_id=x|x$faculty_name=x;then34. ifx$faculty_id=x;then35. msgInvali

21、dfacultyid!36. else37. msgInvalidfacultyname!38. fi39. else40. echo$faculty_id,$faculty_name$FILE_FACULTY41. msgInsertrecordsuccessfully!42. fi43. 44. rm-f$TMP_INSERT_INS45. ;46. Student) 47. #GetStudentidtobeinserted 48. $DIALOG-title$1-inputboxEnterStudentId:630/49. 2$TMP_STUDENT_INS50. student_id

22、=$(cat$TMP_STUDENT_INS) 51. 52. #CheckIftherecordof$student_idexists 53. exportn=$(cat$FILE_STUDENT|grep$student_id,|wc-l|tr-d)54. ifx$n!=x0|x$student_id=x;then55. msgInvalidstudentidoralreadyexsitance!56. return57. fi58. 59. $DIALOG-title$1-inputboxEnterStudentName:630/60. 2$TMP_STUDENT_INS61. stud

23、ent_name=$(cat$TMP_STUDENT_INS)62. ifx$student_name=x;then63. msgInvalidstudentname!64. return65. fi66. 67. $DIALOG-title$1-inputboxEnterFacultyId:630/68. 2$TMP_STUDENT_INS69. faculty_id=$(cat$TMP_STUDENT_INS)70. 71. ifx$faculty_id=x;then72. msgInvalidfacultyid!73. return74. fi75. 76. $DIALOG-title$

24、1-inputboxEnterStudentStatus:630/77. 2$TMP_STUDENT_INS78. student_status=$(cat$TMP_STUDENT_INS)79. 80. ifx$student_status=x;then81. msgInvalidstudentstatus!82. return83. fi84. echo$student_id,$student_name,$faculty_id,$student_status$FILE_STUDENT85. msgInsertrecordsuccessfully!86. 87. rm-f$TMP_STUDE

25、NT_INS88. ;89. Score) 90. #Getthescoreinfoofstudent 91. $DIALOG-title$1-inputboxEnterStudentId:630/92. 2$TMP_SCORE_INS93. student_id=$(cat$TMP_SCORE_INS)94. 95. ifx$student_id=x;then96. msgInvalidstudentid!97. return98. fi99. 100. $DIALOG-title$1-inputboxEnterStudentName:630/101. 2$TMP_SCORE_INS102.

26、 student_name=$(cat$TMP_SCORE_INS)103. 104. ifx$student_name=x;then105. msgInvalidstudentname!106. return107. fi108. 109. $DIALOG-title$1-inputboxEnterSubjectName:630/110. 2$TMP_SCORE_INS111. subject_name=$(cat$TMP_SCORE_INS)112. 113. ifx$subject_name=x;then114. msgInvalidsubjectname!115. return116.

27、 fi 117. 118. #CheckIftherecordof.exists 119. exportn=$(cat$FILE_SCORE|grep$student_id,|grep,$subject_name,|wc-l|tr-d)120. ifx$n!=x0|x$student_id=x;then121. msgTherecordhasalreadyexists!122. return123. fi124. 125. $DIALOG-title$1-inputboxEnterSubjectScore:630/126. 2$TMP_SCORE_INS127. subject_score=$

28、(cat$TMP_SCORE_INS)128. 129. ifx$subject_score=x;then130. msgInvalidstudentscore!131. return132. fi133. 134. $DIALOG-title$1-inputboxEnterFinal/Makeup:630/135. 2$TMP_SCORE_INS136. comment=$(cat$TMP_SCORE_INS)137. 138. ifx$comment=x;then139. msgInvalidcomment!140. return141. fi142. 143. echo$student_

29、id,$student_name,$subject_name,$subject_score,$comment$FILE_SCORE144. msgInsertrecordsuccessfully!145. 146. rm-f$TMP_SCORE_INS147. ;148. 149. esac150. 151. 152. Delete()153. case$1in154. Faculty) 155. #Getfacultyidoftherecordtobedeleted 156. $DIALOG-title$1-inputboxEnterFacultyIdtobedeleted:/157. 63

30、02$TMP_FACULTY_DEL158. faculty_id=$(cat$TMP_FACULTY_DEL) 159. #CheckIftherecordof$facultyexists 160. exportn=$(cat$FILE_FACULTY|grep$faculty_id,|wc-l|tr-d)161. ifx$n=x0|x$faculty_id=x;then162. msgCannotfindinfoof$faculty_id!163. return164. fi 165. #Gettheinfothatdonotcontaintherecordwhoseidis$faculty_id 166. cat$FILE_FACULTY|grep-v$faculty_id,$TMP_FACULTY_DEL 167. #OverwritethefileFaculty.dat 168. mv$TMP_FACULTY_DEL$FILE_FACULTY169. msgDeleteInfoof$faculty_idsuccessfully!170. Studen

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服