Bash: Difference between revisions

From DWIKI
Line 12: Line 12:
  FIRST=${STRING:0:1}
  FIRST=${STRING:0:1}


==check if var contains substring
==check if var contains substring==
   test "${s#*foo}" != "${s}"
   test "${s#*foo}" != "${s}"



Revision as of 09:43, 7 April 2017