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

开通VIP
 

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

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

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

注意事项

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

学生信息管理.doc

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

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

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

4、穷掺临耙烈宛它师件啤树哲龚举嚎涂剔长时 学生信息管理系统 在Linux下Shell编程实现: 功能:对学生信息进行管理。要求实现数据的基本操作:学院和学生信息的增加,修改,删除,统计。 具体要求: (1)构造两个类似数据库的文本文件:    第一个为学院信息文件(students.db),包含字段:    学院编号(唯一),学院名称    第二个为学生信息文件(colleges.db),包含字段:    学号(唯一),学生姓名,所在系编号    说明:分隔符可以自己选定,建议用","; 编码规则自己定 (2)文件要求:类似数据库文本文件,每个记录占一行,字段之间用","分

5、割字段含义:         1)学号(主码)  2)姓名   3)所在系   以下的每个功能分别作为一个函数        1.向该文件中插入记录        2.显示该文件中的每条记录的每个字段值        3.从该文件中删除指定学号的记录   shell程序代码如下: #! /bin/sh insert_s() { file_name="/root/aillo/students.db" dialog --title "Student: Insert a record " --inputbox "Please input the student's info

6、rmation in the sort:(id,name,college):" 20 50 2>tmp.txt content=$(cat tmp.txt) IFS="," read sid sname sinmenu.txt sid=$(cat menu.txt) if [ "$sid" != "0" ];then dialog --title "ERROR" --msgbox "Record has existed!" 20 30 else

7、 echo "$content">>$file_name dialog --title "Reply Info" --msgbox "Add successfully!" 10 30 fi } insert_c() { file_name="/root/aillo/colleges.db" dialog --title "College: Insert a record " --inputbox "Please input the college's information in the sort(cid,cname):" 20 50 2>tmp.txt

8、 content=$(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_name dialog --title "Reply Inf

9、o" --msgbox "Add successfully!" 10 30 fi } delete_s() { file_name="/root/aillo/students.db" dialog --title "Student: Delete a record " --inputbox "Please input the ID of the student you want to delete:" 20 50 2>tmp.txt read sidtmp.txt mv tmp.txt $file_

10、name dialog --title "Reply Info" --msgbox "the record has been delete!" 10 30 } delete_c() { file_name="/root/aillo/colleges.db" dialog --title "College: Delete a record " --inputbox "Please input the ID of the college you want to delete:" 20 50 2>tmp.txt read cid

11、le_name>tmp.txt mv tmp.txt $file_name dialog --title "Reply Info" --msgbox "the record has been delete!" 10 30 } display_s() { file_name="/root/aillo/students.db" cat $file_name | while read line do echo $line>tmp.txt IFS="," read sid sname sin>t.txt

12、 echo "sname: $sname">>t.txt echo "sin: $sin">>t.txt echo "---------------------">>t.txt IFS=" " done content=$(cat t.txt) dialog --title "All Students' Info" --msgbox "$content" 50 50 rm t.txt } display_c() { file_name="/root/aillo/colleges.db" cat $file_name | while read li

13、ne do echo $line>tmp.txt IFS="," read cid cname>t.txt echo "cname: $cname">>t.txt echo "---------------------">>t.txt IFS=" " done content=$(cat t.txt) dialog --title "All colleges' Info" --msgbox "$content" 50 50 rm t.txt } count() { fil

14、e_name="/root/aillo/students.db" dialog --title "Count " --inputbox "Please input the id of college students you want to count:" 20 50 2>tmp.txt read p1

15、name="/root/aillo/students.db" dialog --title "Modify Student's Info " --inputbox "Please input the new information you want to modify in the sort(sid,sname,sin):" 20 50 2>tmp.txt IFS="," read p1 p2 p3tmp.txt echo "$p1,$p2,$p3">>tmp.txt IFS=" " mv tmp.t

16、xt $file_name dialog --title "Reply Info" --msgbox "The information has been modified!" 10 30 } change_c() { file_name="/root/aillo/colleges.db" dialog --title "Modify College's Info" --inputbox "Please input the new information:" 20 50 2>tmp.txt IFS="," read p1 p2

17、 $file_name>tmp.txt echo "$p1,$p2">>tmp.txt IFS=" " mv tmp.txt $file_name dialog --title "Reply Info" --msgbox "The information has been modified!" 10 30 } status=1 dialog --title " Students' Info Manage System" --msgbox "\\nWelccome to use the System!\\n" 10 35 if [ $? != 0 ];then sle

18、ep 1 dialog --clear exit 0 fi while [ "$status" = "1" ] do dialog --title "Main Menu" --menu "Choices" 15 20 2 1 "Student" 2 "College" 2>tmp.txt MY_CHOICE=$(cat tmp.txt) if [ $? != 0 ];then sleep 1 dialog --clear exit 0 fi if [ "$MY_CHOICE" = "1" ];then dialog --title "S

19、tudent Info Manage" --menu "Choose Operation" 20 30 7 1 "INSERT" 2 "DELETE" 3 "MODIFY" 4 "COUNT" 5 "DISPLAY" 6 "BACK" 7 "EXIT" 2>tmp.txt if [ $? != 0 ];then sleep 1 dialog --clear exit 0 fi choice_2=$(cat tmp.txt) if [ "$choice_2" = "1" ];then insert_s elif [ "$choice_2

20、" = "2" ];then delete_s elif [ "$choice_2" = "3" ];then change_s elif [ "$choice_2" = "4" ];then count elif [ "$choice_2" = "5" ];then display_s elif [ "$choice_2" = "6" ];then continue else break fi else dialog --title "College Info Manage" --menu "Cho

21、ose Operation" 20 30 7 1 "INSERT" 2 "DELETE" 3 "MODIFY" 4 "COUNT" 5 "DISPLAY" 6 "BACK" 7 "EXIT" 2>tmp.txt if [ $? != 0 ];then sleep 1 dialog --clear exit 0 fi choice_2=$(cat tmp.txt) if [ "$choice_2" = "1" ];then insert_c elif [ "$choice_2" = "2" ];then delete_c

22、elif [ "$choice_2" = "3" ];then change_c elif [ "$choice_2" = "4" ];then count elif [ "$choice_2" = "5" ];then display_c elif [ "$choice_2" = "6" ];then continue else break fi fi dialog --yesno "Do you want to continue ?" 10 20 if [ $? = 0 ];then statu

23、s=1 else status=0 fi done sleep 1 dialog --clear exit 0 注意:在运行程序之前要先创建students.db和colleges.db这两个文件,不然会出错 运行结果: (1)欢迎界面和主界面 (2)"选择操作"界面 (3)插入一条记录 (4)显示所有的学生/学院信息 (5)删除一条记录 (6)修改记录 (7)经过删除修改后的信息 (8)统计某个学院的学生数

24、 学生成绩管理   view plaincopy to clipboardprint? 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

25、/Score.dat"   11. msg() {   12.   $DIALOG --title "Prompt" --msgbox "$1" 15 30   13. }   14.    15. Insert() {   16.     case "$1" in   17.         Faculty)   18.               ####  Get faculty id to be inserted    19.               $DIALOG --title "$1" --inputbox "Enter [Faculty Id]:" 6 3

26、0/   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 [ "

27、x$n" != "x0" ] || [ "x$faculty_id" = "x" ] ; then   25.                     msg "Invalid faculty id or already exsitance !"   26.                     return   27.                 fi   28.               ####  Get faculty name to be inserted    29.               $DIALOG --title "$1" --inputbox "E

28、nter [Faculty Name]:" 6 30/   30.                  2> ${TMP}_INSERT_INS   31.               faculty_name=$(cat ${TMP}_INSERT_INS)   32.               ####  Check if faculty id and faculty name to be inserted are valid    33.               if [ "x$faculty_id" = "x" ] || [ "x$faculty_name" = "x" ]

29、 ; then   34.                   if [ "x$faculty_id" = "x" ] ; then   35.                 msg "Invalid  faculty id !"   36.                   else   37.                 msg "Invalid faculty name !"   38.                   fi   39.               else   40.                   echo $faculty_id,$fa

30、culty_name >> $FILE_FACULTY   41.                   msg "Insert record successfully !"   42.               fi   43.                  44.               rm -f ${TMP}_INSERT_INS   45.               ;;   46.         Student)   47.               ####  Get Student id to be inserted    48.         

31、      $DIALOG --title "$1" --inputbox "Enter [Student Id]:" 6 30/   49.                  2> ${TMP}_STUDENT_INS   50.               student_id=$(cat ${TMP}_STUDENT_INS)   51.                 52.               #### Check If the record of $student_id exists    53.                 export n=$(cat $F

32、ILE_STUDENT | grep "^${student_id}," | wc -l | tr -d " ")   54.                 if [ "x$n" != "x0" ] || [ "x$student_id" = "x" ] ; then   55.                     msg "Invalid student id or already exsitance !"   56.                     return   57.                 fi   58.                  59.

33、               $DIALOG --title "$1" --inputbox "Enter [Student Name]:" 6 30/   60.                  2> ${TMP}_STUDENT_INS   61.               student_name=$(cat ${TMP}_STUDENT_INS)       62.                 if [ "x$student_name" = "x" ] ; then   63.                     msg "Invalid student name 

34、"   64.                     return   65.                 fi       66.                  67.               $DIALOG --title "$1" --inputbox "Enter [Faculty Id]:" 6 30/   68.                  2> ${TMP}_STUDENT_INS   69.               faculty_id=$(cat ${TMP}_STUDENT_INS)   70.                  7

35、1.               if [ "x$faculty_id" = "x" ] ; then   72.                     msg "Invalid faculty id !"   73.                     return   74.                 fi   75.                    76.               $DIALOG --title "$1" --inputbox "Enter [Student Status]:" 6 30/   77.                  2

36、> ${TMP}_STUDENT_INS   78.               student_status=$(cat ${TMP}_STUDENT_INS)   79.                  80.               if [ "x$student_status" = "x" ] ; then   81.                     msg "Invalid student status!"   82.                     return   83.                 fi   84.            

37、     echo $student_id,$student_name,$faculty_id,$student_status>> $FILE_STUDENT   85.                 msg "Insert record successfully !"   86.            87.               rm -f ${TMP}_STUDENT_INS   88.               ;;   89.         Score)   90.              ####  Get the score info of studen

38、t    91.               $DIALOG --title "$1" --inputbox "Enter [Student Id]:" 6 30/   92.                  2> ${TMP}_SCORE_INS   93.               student_id=$(cat ${TMP}_SCORE_INS)   94.                  95.               if [ "x$student_id" = "x" ] ; then   96.                     msg "Invali

39、d student id !"   97.                     return   98.                 fi        99.                  100.               $DIALOG --title "$1" --inputbox "Enter [Student Name]:" 6 30/   101.                  2> ${TMP}_SCORE_INS   102.               student_name=$(cat ${TMP}_SCORE_INS)   103.  

40、                104.               if [ "x$student_name" = "x" ] ; then   105.                     msg "Invalid student name !"   106.                     return   107.                 fi       108.                    109.               $DIALOG --title "$1" --inputbox "Enter [Subject Name]:" 6

41、 30/   110.                  2> ${TMP}_SCORE_INS   111.               subject_name=$(cat ${TMP}_SCORE_INS)   112.                  113.               if [ "x$subject_name" = "x" ] ; then   114.                     msg "Invalid subject name !"   115.                     return   116.          

42、       fi       117.                 118.               #### Check If the record of ... exists    119.                 export n=$(cat $FILE_SCORE | grep "^${student_id}," | grep ",${subject_name}," | wc -l | tr -d " ")   120.               if [ "x$n" != "x0" ] || [ "x$student_id" = "x" ] ; then 

43、  121.                     msg "The record has already exists !"   122.                     return   123.                 fi   124.                  125.               $DIALOG --title "$1" --inputbox "Enter [Subject Score]:" 6 30/   126.                  2> ${TMP}_SCORE_INS   127.            

44、   subject_score=$(cat ${TMP}_SCORE_INS)   128.                  129.               if [ "x$subject_score" = "x" ] ; then   130.                     msg "Invalid student score !"   131.                     return   132.                 fi       133.                  134.               $DIALOG

45、 --title "$1" --inputbox "Enter [Final/Makeup]:" 6 30/   135.                  2> ${TMP}_SCORE_INS   136.               comment=$(cat ${TMP}_SCORE_INS)   137.                  138.               if [ "x$comment" = "x" ] ; then   139.                     msg "Invalid comment !"   140.          

46、           return   141.                 fi   142.                    143.                 echo $student_id,$student_name,$subject_name,$subject_score,$comment >> $FILE_SCORE   144.                 msg "Insert record successfully !"   145.                    146.               rm -f ${TMP}_SCO

47、RE_INS   147.               ;;   148.        149.     esac   150. }   151.    152. Delete() {   153.     case "$1" in   154.         Faculty)   155.             ####  Get faculty id of the record to be deleted    156.             $DIALOG --title "$1" --inputbox "Enter [Faculty Id] to be de

48、leted:" /   157.                 6 30 2> ${TMP}_FACULTY_DEL   158.             faculty_id=$(cat ${TMP}_FACULTY_DEL)   159.             #### Check If the record of $faculty exists    160.             export n=$(cat $FILE_FACULTY | grep "^${faculty_id}," | wc -l | tr -d " ")   161.             if

49、 [ "x$n" == "x0" ] || [ "x$faculty_id" = "x" ] ; then   162.                 msg "Can not find info of $faculty_id !"   163.                 return   164.             fi   165.             ####  Get the info that do not contain the record whose id is $faculty_id    166.             cat $FILE_FACULTY | grep -v "^${faculty_id}," > ${TMP}_FACULTY_DEL   167.             #### Overwrite the file Faculty.dat    168.             mv ${TMP}_FACULTY_DEL $FILE_FACULTY   169.             msg "Delete Info of $faculty_id successfully !"   170.             Studen

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

关于我们      便捷服务       自信AI       AI导航        抽奖活动

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

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

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

关注我们 :微信公众号    抖音    微博    LOFTER 

客服