Bash: Difference between revisions

From DWIKI
Line 15: Line 15:


==check if var contains substring==
==check if var contains substring==
   test "${s#*foo}" != "${s}"
   [[ $foo =~ .*sub.* ]]


==move cursor==
==move cursor==

Revision as of 11:30, 11 January 2018