| 查看: 1403 | 回复: 5 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
[交流]
开始学习shell已有5人参与
|
|||
|
最近对shell产生了浓厚的兴趣想系统地学习一下,并在小木虫记录下自己的学习过程。 先记录些以前的总结 grep grep '[[:lower:]]' filename #lower-alpha grep '\(ab\)\(cd\)[def]*\2\1 #find ab then cd then [def] then cd than ab houxiangyinyong sed sed 's/Tolstoy/Camus/' filename #just change the first one sed 's/Tolstoy/Camus/g' filename #change all sed 's/Tolstoy/Camus/2' filename #change the second one sed -n '3,5p' filename #print from line 3 to 5 sed '/xixi/,/haha/ s/baz/quux/g' filename #find lines containing xixi and haha #then replace baz with quux in these lines sed '/used/! s/new/used/g' filename #find lines not containing used sed '/^#/d' filename | sort > filename.sorted #find lines containg # at the beginning #then delet tail tail -7 filename # print last 7 lines tail -7 filename > 1 # print last 7 lines in 1 cut cut -b 3 filename # print the third byte from each line cut -d : -f 1 filename # -d customized separator -f field joint joint file1 file2 # file1 and file2 should be in the same format joint -a1 file1 file2 # show the difference in file1 awk awk -F: '{print $1,$2}' filename # F--field separator print field 1 and 2 awk -F: -v 'OFS=**' '{print $1,$2}' filename # v--variable OFS--output field sparator sort sort filename # sort according to ASCII sort -u filename # sort according to ASCII and then delete repeated term sort -r filename # descending order sort filename -o filename # sort and then print in the same file sort -n filename # sort according to the number sort -n -t : -k 2 filename # -n sort according to the number -t consider colon as separator -k which row uniq sort latin-numbers | uniq # no repeated lines sort latin-numbers | uniq -c # recorf repeated time sort latin-numbers | uniq -d # show the repeated term sort latin-numbers | uniq -u # show the non-repeated term wc wc -c # calculate the number of bytes wc -l # calculate the number of lines wc -w # calculate the number of words |
» 猜你喜欢
2025年沈阳工业大学、沈阳化工大学硕士研究生接收调剂
已经有0人回复
汕头大学化学招调剂,相关内容如下。
已经有4人回复
物理化学论文润色/翻译怎么收费?
已经有271人回复
大湾区大学(筹)刘天辉课题组招收博士生(与中山大学物理学院联合培养)
已经有16人回复
PbS量子点如何确定浓度
已经有11人回复
已知面上挂了,小学校实验方向无平台,感觉太难了
已经有26人回复
大湾区大学刘天辉课题组招收2026级博士生(与中山大学物理学院联合培养)
已经有22人回复
求助各位大佬,球球了,在这科萨头
已经有0人回复
PbS量子点紫外吸收
已经有0人回复
比利时鲁汶大学与国家留学基金委共同资助博士研究生CSC-KU Leuven PhD Scholarship
已经有0人回复
» 本主题相关价值贴推荐,对您同样有帮助:
Hadoop学习历程
已经有0人回复
HYCOM模式的运行对计算机硬件的要求,能否在个人计算机上测试运行?
已经有0人回复
关于薄壁机翼的流固耦合问题?
已经有1人回复
学习lammps 对in文件的一个概述性心得
已经有38人回复
系统隐藏文件如何找出
已经有4人回复
python之蟒开启理论计算化学的新时代
已经有22人回复
【求助】弹性力学-ansys-机械
已经有8人回复
Linux集群rocks的安装和SGE管理调度MS5.5作业
已经有16人回复
Autodock结果报错是什么意思?
已经有1人回复
【讨论】怎样提高工作效率
已经有10人回复
【分享】红帽学院指定教材《Red Hat Linux用户基础》PDF版【已搜索无重复】
已经有8人回复
【分享】mdbbs发布了三年优质资源汇总电子书
已经有48人回复
【分享】mdbbs发布了三年优质资源汇总电子书
已经有40人回复
【资源】【jabriel分享】煤化工资料之煤气化,共同学习啊
已经有20人回复

virtualzx
木虫 (著名写手)
- QC强帖: 2
- 应助: 263 (大学生)
- 金币: 7161.3
- 红花: 54
- 帖子: 1605
- 在线: 317.6小时
- 虫号: 2069080
- 注册: 2012-10-18
- 性别: GG
- 专业: 理论和计算化学
5楼2016-01-25 01:27:49
3楼2016-01-24 17:09:50

4楼2016-01-24 22:01:33
171808111
新虫 (初入文坛)
- 应助: 0 (幼儿园)
- 金币: 337.6
- 帖子: 38
- 在线: 7.6小时
- 虫号: 4138933
- 注册: 2015-10-12
- 性别: GG
- 专业: 有机分子功能材料化学

6楼2016-01-25 02:09:35













回复此楼