to text
For formats.
Convert data into plain text format.
Command Type
built-in
Signature
> to text {flags}
Flags
--no-newline, -n: Do not append a newline to the end of the text.--serialize, -s: Serialize nushell types that cannot be deserialized.
Input/output types:
| input | output |
|---|---|
| any | string |
Examples
Outputs data as simple text with a trailing newline.
> [1] | to text
1
Outputs data as simple text without a trailing newline.
> [1] | to text --no-newline
1
Outputs external data as simple text.
> git help -a | lines | find -r '^ ' | to text
Outputs records as simple text.
> ls | to text
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.