User Tools

Site Tools


programming-languages:bash:loops

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
programming-languages:bash:loops [2023/11/01 11:31] – [While-loop] tormecprogramming-languages:bash:loops [2023/11/01 11:32] – [Test on strings] tormec
Line 43: Line 43:
 | ''<str1> > <str2>'' | ''<str1>'' comes after ''<str2>'' in lexicographically order | | ''<str1> > <str2>'' | ''<str1>'' comes after ''<str2>'' in lexicographically order |
 | ''<str1> < <str2>'' | ''<str1>'' comes before ''<str2>'' in lexicographically order | | ''<str1> < <str2>'' | ''<str1>'' comes before ''<str2>'' in lexicographically order |
- 
-<WRAP center round tip 100%> 
-To check if ''<sub-str>'' is in ''<str>'' use: 
-<code bash> 
-#!/bin/bash 
- 
-str="string" 
-if [[ "$str" == *ing* ]]; then 
-echo "partially match"; else 
-echo "no match" 
-fi 
-</code> 
-</WRAP> 
  
  
programming-languages/bash/loops.txt · Last modified: 2023/11/01 12:22 by tormec