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 10:30, 11 January 2018