mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2024-11-22 20:54:19 +00:00
add if loop
This commit is contained in:
parent
e5e610f319
commit
3842241d25
1 changed files with 4 additions and 1 deletions
|
@ -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 a new issue