print
for strings> print {flags} ...rest
--no-newline, -n
: print without inserting a newline for the line ending--stderr, -e
: print to stderr instead of stdout...rest
: the values to printinput | output |
---|---|
any | nothing |
nothing | nothing |
Print 'hello world'
>print"hello world"
Print the sum of 2 and 3
>print (2+3)
Unlike echo
, this command does not return any value (print | describe
will return "nothing"). Since this command has no output, there is no point in piping it with other commands.
print
may be used inside blocks of code (e.g.: hooks) to display text during execution without interfering with the pipeline.
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/print.html