| 查看: 1404 | 回复: 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 |
» 猜你喜欢
中教金源的流动池
已经有0人回复
RSC ADV状态问题
已经有4人回复
物理化学论文润色/翻译怎么收费?
已经有298人回复
湖南大学招收锂离子电池、离子液体、高分子与凝胶材料、电催化方向博士生多名
已经有8人回复
南京大学蔡亮课题组诚招2026年申请-考核制博士生2-3名(电解水制氢,XAFS谱学等)
已经有32人回复
求助各位大佬配位化学学习教材!!!
已经有0人回复
大连海事大学国家级人才团队2026年博士研究生招生启事
已经有10人回复
内蒙古大学青年长江学者王蕾教授课题组2026年博士招聘,2-3人
已经有11人回复
多相催化-2026年CSC博士及洪堡合作博士后招生!
已经有0人回复
中国地质大学(武汉)—国家级青年人才杨明教授组-招收博士-新能源材料化学及催化材料
已经有27人回复
求光催化产过氧化氢的PPT !!!毕业答辩需要
已经有1人回复
» 本主题相关价值贴推荐,对您同样有帮助:
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人回复

3楼2016-01-24 17:09:50

4楼2016-01-24 22:01:33
virtualzx
木虫 (著名写手)
- QC强帖: 2
- 应助: 263 (大学生)
- 金币: 7161.3
- 红花: 54
- 帖子: 1605
- 在线: 317.6小时
- 虫号: 2069080
- 注册: 2012-10-18
- 性别: GG
- 专业: 理论和计算化学
5楼2016-01-25 01:27:49
171808111
新虫 (初入文坛)
- 应助: 0 (幼儿园)
- 金币: 337.6
- 帖子: 38
- 在线: 7.6小时
- 虫号: 4138933
- 注册: 2015-10-12
- 性别: GG
- 专业: 有机分子功能材料化学

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













回复此楼