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
Next revisionBoth sides next revision
linux:bashshell [2016/01/15 05:01] – [integer comparison] adminlinux:bashshell [2016/01/26 07:07] – [Find files that contain the text] admin
Line 316: Line 316:
 ==== Find files that contain the text ==== ==== Find files that contain the text ====
 <code bash> <code bash>
-grep -rnw babyshopvn -e "Begin Facebook Code"+grep -rnw -e "Begin Facebook Code"
 </code> </code>
 ==== Manipulating String ==== ==== Manipulating String ====
 +refer: http://tldp.org/LDP/abs/html/string-manipulation.html 
 +  * String length: **${#string}**:<code bash> 
 +str="First String"; echo ${#str} 
 +</code>output:<code> 
 +12 
 +</code> 
 +  * Replace String:<code>${string//substring/replacement}</code>Example:<code bash> 
 +str="First String"; echo ${str//First/Second} 
 +</code>output:<code> 
 +Second String 
 +</code>
linux/bashshell.txt · Last modified: 2022/10/29 16:15 by 127.0.0.1