mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 21:07:00 +00:00
add if loop
This commit is contained in:
parent
e5e610f319
commit
3842241d25
@ -784,8 +784,11 @@ while [[ $(pidof perl) ]];do echo f;sleep 10;done && python timetorunpython.py
|
|||||||
```
|
```
|
||||||
|
|
||||||
##### If loop
|
##### If loop
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# if and else loop for string matching
|
||||||
|
if [[ "$c" == "read" ]]; then outputdir="seq"; else outputdir="write" ; fi
|
||||||
|
```
|
||||||
|
|
||||||
if (($j==$u+2))
|
if (($j==$u+2))
|
||||||
#(( )) use for arithmetic operation
|
#(( )) use for arithmetic operation
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user