linux:bashshell
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:bashshell [2016/01/15 06:16] – [Manipulating String] admin | linux:bashshell [2019/03/09 10:00] – [Find files that contain the text] admin | ||
---|---|---|---|
Line 315: | Line 315: | ||
</ | </ | ||
==== Find files that contain the text ==== | ==== Find files that contain the text ==== | ||
- | <code bash> | + | * Simple<code bash> |
- | grep -rnw babyshopvn | + | grep -rnw . -e "Begin Facebook Code" |
+ | </ | ||
+ | * Custom find with regular expression< | ||
+ | grep -rnw . -e ' | ||
</ | </ | ||
==== Manipulating String ==== | ==== Manipulating String ==== | ||
+ | refer: http:// | ||
* String length: **${# | * String length: **${# | ||
str=" | str=" | ||
Line 325: | Line 329: | ||
</ | </ | ||
* Replace String:< | * Replace String:< | ||
- | str=" | + | str=" |
+ | </ | ||
+ | Second String | ||
+ | </ | ||
+ | ==== update array to file ==== | ||
+ | Below is array configs.txt:< | ||
+ | c1 = 0, | ||
+ | c2 = 51, | ||
+ | c3 = 26, | ||
+ | </ | ||
+ | update array to files: | ||
+ | <code bash> | ||
+ | index=0;for i in `cat configs.txt | awk ' | ||
</ | </ | ||
- | * |
linux/bashshell.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1