Can you explain what this script means?
2<<< hello <&2 cat
If I run this shell script, it spits hello. But cannot understand what it means.
Can you please explain one by one?
Many thanks.
Can you explain what this script means?
2<<< hello <&2 cat
If I run this shell script, it spits hello. But cannot understand what it means.
Can you please explain one by one?
Many thanks.
see https://www.gnu.org/software/bash/manual/bash.html 3.6.7 and 3.6.8
2<<< hello puts a string hello to stderr;<&2 redirect stderr to stdincat is a program which receive the string hello from stdin and print out