linux大作业初稿
摘要: #!/bin/bashclearrecord_file=passwdagain=""while [ "$again" = "" ]doclearecho " 用户信息主菜单"echo "=================================="echo "1、 打印当前所有记录"echo "2、 打印当前所有记录(格式化后的)"echo "3、 打印用户名和用户ID"echo "4、 ...
阅读全文
sort的使用
摘要: 请教SORT的详细用法sortcat students John Johnsen john.johnsen@tp.com 503.555.1111Hassaan Sarwarhsarwar@k12.st.or 503.444.2132David Kendall d_kendall@msnbc.org 229.111.2013sort students David Kendall d_kendal...
阅读全文
awk实例
摘要: Awk 实例,第 1 部分 通用线程:Awk 实例,第 1 部分一种名称很奇特的优秀语言介绍 Daniel Robbins总裁兼 CEO,Gentoo Technologies, Inc.2000 年 12 月 转载自:IBM developerWorks 中国网站 内容: 捍卫 awk 第一个 awk 多个字段 外部脚本 BEGIN 和 END 块 规则表达式和块 表达式和块 条件...
阅读全文
awk使用手册
摘要: awk使用手册什么是awk? 你可能对UNIX比较熟悉,但你可能对awk很陌生,这一点也不奇怪,的确,与其优秀的功能相比,awk还远没达到它应有的知名度。awk是什么?与其它大多数UNIX命令不同的是,从名字上看,我们不可能知道awk的功能:它既不是具有独立意义的英文单词,也不是几个相关单词的缩写。事实上,awk是三个人名的缩写,他们是:Aho、(Peter)Weinberg和(Brain)Ker...
阅读全文
交互增加多个用户
摘要: #!/bin/bash echo "*****************"echo 欢迎使用echo "1.添加用户"echo "2.退出操作"echo "*****************"echo "请选择:"read again while [ $again -eq 1 ]doecho ==============================echo "请输入您希望创建的用户的个数";r...
阅读全文
成批添加用户账户
摘要: 成批添加用户账户 创建脚本addusers,内容为: #!/bin/bash echo -n " Give me the name of the file containing user data..." read file[1] [ ! -f $file ] && ( echo " '$file' does not exist..."; exit 1 ) while read u...
阅读全文
LINUX乘法表程序
摘要: #!/bin/shecho "大九九乘法表"for i in 1 2 3 4 5 6 7 8 9dofor j in 1 2 3 4 5 6 7 8 9dolet "sum=i*j"printf "$i*$j=$sum \t"doneprintf "\n"done#!/bin/shecho "小九九乘法表"for i in 1 2 3 4 5 6 7 8 9doj=1while [ $j -le ...
阅读全文