User Tools

Site Tools


linux:bashshell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:bashshell [2019/03/09 10:00] – [Find files that contain the text] adminlinux:bashshell [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 320: Line 320:
   * Custom find with regular expression<code bash>   * Custom find with regular expression<code bash>
 grep -rnw . -e 'mongo.*' grep -rnw . -e 'mongo.*'
 +</code>
 +==== Find files that file name length > 29 ====
 +<code bash>
 +for i in `ls -1`;do sub_i=(`echo $i|cut -d'-' -f 1`);lensub_i=${#sub_i}; if [ $lensub_i -ge 29 ]; then echo $sub_i;echo $i; fi  done
 </code> </code>
 ==== Manipulating String ==== ==== Manipulating String ====
linux/bashshell.1552125650.txt.gz · Last modified: 2022/10/29 16:15 (external edit)