mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
mapfile
recipe is bash 4.4+, -t
was added in it
@@ -11,7 +11,7 @@ array=( $(mycommand) )
|
||||
If it outputs multiple lines, each of which should be an element:
|
||||
|
||||
```sh
|
||||
# For bash 4.x, must not be in posix mode, may use temporary files
|
||||
# For bash 4.4+, must not be in posix mode, may use temporary files
|
||||
mapfile -t array < <(mycommand)
|
||||
|
||||
# For bash 3.x+, must not be in posix mode, may use temporary files
|
||||
|
Reference in New Issue
Block a user