mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-12-23 08:46:36 +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
|
||||
|
||||
```bash
|
||||
# if and else loop for string matching
|
||||
if [[ "$c" == "read" ]]; then outputdir="seq"; else outputdir="write" ; fi
|
||||
```
|
||||
|
||||
if (($j==$u+2))
|
||||
#(( )) use for arithmetic operation
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user