for/if/while: add
This commit is contained in:
11
pages/common/for.md
Normal file
11
pages/common/for.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# for
|
||||
|
||||
> Shell loop over parameters
|
||||
|
||||
- Perform a command with different arguments.
|
||||
|
||||
`for argument in 1 2 3; do {{command $argument}}; done`
|
||||
|
||||
- Perform a command in every directory.
|
||||
|
||||
`for d in *; do (cd $d; {{command}}); done`
|
Reference in New Issue
Block a user