使用bash

本文档详述了Shell编程的基础知识,包括bash命令如read的使用,以及如何利用sed等工具进行文件中字符串的查找与替换。通过多个实例演示,帮助读者掌握shell脚本的编写技巧。

bash之read命令

http://www.cnblogs.com/xiangzi888/archive/2012/03/27/2420084.html

 

shell使用攻略

https://www.cnblogs.com/xiangzi888/p/4025549.html

 

How can I replace a string in a file(s)?

https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files/112024#112024

https://stackoverflow.com/questions/905144/sed-beginner-changing-all-occurrences-in-a-folder

https://stackoverflow.com/questions/11392478/how-to-replace-a-string-in-multiple-files-in-linux-command-line

http://brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html

https://www.folkstalk.com/2012/01/sed-command-in-unix-examples.html

http://www.runoob.com/w3cnote/linux-findtoreplace.html

http://www.cnblogs.com/end/archive/2012/05/24/2517131.html

  sed -i -- 's/foo/bar/g' *其实可以直接为sed -i 's/foo/bar/g' *, 这个表达式也可以在vim里面操作

  find . -type f -exec sed -i.bak "s/foo/bar/g" {} \;   还未尝试

  sed -i "s/原字符串/新字符串/g" `grep 原字符串 -rl 所在目录`    未尝试

 

bash programming

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html#toc11

 

How to compare strings in Bash

https://stackoverflow.com/questions/2237080/how-to-compare-strings-in-bash

 

unix-quick-guide

https://www.tutorialspoint.com/unix/unix-quick-guide.htm

 

- cd命令技巧
cd 直接去home
cd - 上一个命令
cd + pushd, popd合用

 

转载于:https://www.cnblogs.com/sysmman/p/9855927.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值