Ion supports two forms of process expansions: string-based process expansions ($()) that are commonly found in POSIX shells, and array-based process expansions (@()), a concept borrowed from the Oil shell. Where a string-based process expansion will execute a command and return a string of that command's standard output, an array-based process expansion will split the output into an array delimited by whitespaces.
let string = $(cmd args...) let array = @(cmd args...)
- To split outputs by line, see
@(cmd)is equivalent to
- If not double quoted, newlines will be replaced with spaces