programming-languages:bash:loops
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programming-languages:bash:loops [2023/11/01 11:31] – [While-loop] tormec | programming-languages:bash:loops [2023/11/01 12:22] (current) – tormec | ||
---|---|---|---|
Line 31: | Line 31: | ||
done | done | ||
</ | </ | ||
- | |||
- | |||
- | ===== Test on strings ===== | ||
- | |||
- | ^ expression ^ is TRUE if ^ | ||
- | | ''< | ||
- | | '' | ||
- | | '' | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | |||
- | <WRAP center round tip 100%> | ||
- | To check if ''< | ||
- | <code bash> | ||
- | #!/bin/bash | ||
- | |||
- | str=" | ||
- | if [[ " | ||
- | echo " | ||
- | echo "no match" | ||
- | fi | ||
- | </ | ||
- | </ | ||
- | |||
- | |||
- | ===== Test on integers ===== | ||
- | |||
- | ^ expression ^ is TRUE if ^ | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | | ''< | ||
- | |||
programming-languages/bash/loops.txt · Last modified: 2023/11/01 12:22 by tormec