<<: A here document. It is often used to print multi-line strings.command << WORD Text WORDHere,
commandwill take everything until it finds the next occurrence ofWORD,Textin the example above, as input . WhileWORDis oftenEoFor variations thereof, it can be any alphanumeric (and not only) string you like. When any part ofWORDis quoted or escaped, the text in the here document is treated literally and no expansions are performed (on variables for example). If it is unquoted, variables will be expanded. For more details, see the bash manual.If you want to pipe the output of
command << WORD ... WORDdirectly into another command or commands, you have to put the pipe on the same line as<< WORD, you can't put it after the terminating WORD or on the line following. For example:command << WORD | command2 | command3... Text WORD<<<: Here strings, similar to here documents, but intended for a single line. These exist only in the Unix port or rc (where it originated), zsh, some implementations of ksh, yash and bash.command <<< WORD
https://unix.stackexchange.com/questions/590694/posix-compliant-way-to-redirect-stdout-and-stderr-to-a-file
Gilles 'SO- stop being evil'
- 866.1k
- 205
- 1.8k
- 2.3k
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Moshe
- 322
- 7
- 17
There's no `>>(:)` just `>` redirection to a `>(...)` process substitution.
Stéphane Chazelas
- 586.8k
- 96
- 1.1k
- 1.7k
Gilles 'SO- stop being evil'
- 866.1k
- 205
- 1.8k
- 2.3k
indicate which operators are available only in some shells; group the sentence punctuation operators; link to my well-appreciated answer on brackets; show equivalences of && and ||; mention !; mention >|; mention process substitution
Gilles 'SO- stop being evil'
- 866.1k
- 205
- 1.8k
- 2.3k