Emmm Windows 装了 busybox 或者 coreutils,cat 和 echo 的效果确实不一样。 --- > echo 2333 | echo 2333 > echo 2333 | cat cat : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input. At line:1 char:13 + echo 2333 | cat + ~~~ + CategoryInfo : InvalidArgument: (2333:PSObject) [Get-Content], ParameterBindingExcep tion + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetContentCommand
The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. If file is a single dash (`-') or absent, cat reads from the standard input. The echo utility writes any specified operands, separated by single blank (` ') characters and followed by a newline (`\n') character, to the standard output.