linux:bashshell
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:bashshell [2016/07/08 07:14] – [update array to file] admin | linux:bashshell [2022/10/29 16:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 315: | Line 315: | ||
| </ | </ | ||
| ==== Find files that contain the text ==== | ==== Find files that contain the text ==== | ||
| - | <code bash> | + | * Simple<code bash> |
| grep -rnw . -e "Begin Facebook Code" | grep -rnw . -e "Begin Facebook Code" | ||
| + | </ | ||
| + | * Custom find with regular expression< | ||
| + | grep -rnw . -e ' | ||
| + | </ | ||
| + | ==== Find files that file name length > 29 ==== | ||
| + | <code bash> | ||
| + | for i in `ls -1`;do sub_i=(`echo $i|cut -d' | ||
| </ | </ | ||
| ==== Manipulating String ==== | ==== Manipulating String ==== | ||
| Line 338: | Line 345: | ||
| update array to files: | update array to files: | ||
| <code bash> | <code bash> | ||
| - | index=0;for i in `cat configs.txt | awk ' | + | index=0;for i in `cat configs.txt | awk ' |
| </ | </ | ||
linux/bashshell.1467962042.txt.gz · Last modified: (external edit)
