1 | initial version |
There are a couple of methods for utilizing a multiline command within "script:" using YAML:
|
) or folded style (>
) scalar block styles to preserve newlines and allow multiline commands. For example:script:
- |
echo "This is a
multiline
command."
or
script:
- >
echo "This is a
multiline
command."
>
scalar block style with the |
literal block scalar to allow multiline commands and remove newlines. For example:script:
- >-
echo "This is a
multiline
command."
Both methods allow for multiline commands to be utilized within "script:" using YAML, but choosing the appropriate method depends on whether or not newlines need to be preserved or removed.