小编Ben*_*ynn的帖子

cat 到 stderr,同时读取到文件末尾标记

撇开使用输出是否应该转到 stderr的问题,如果您必须将下面 cat 命令的输出重定向到 stderr,您会怎么做?

function usage {
  cat << "  EOF_USAGE"
  usage: FrameworkBuildScript --clean-all --clean-sdk-only --build-in-externals --debug-only --release-only --resources-only

  --clean-all                   Clean all libraries before building
  --clean-sdk-only              Clean SDK library before building
  --build-in-externals          Include all libraries in the SDK library
  --debug-only                  Build only the debug SDK framework
  --release-only                Build only the release SDK framework
  --resources-only              Build only the SDK resource bundles

  Example: $0 --clean --build-in-externals
  EOF_USAGE
}
Run Code Online (Sandbox Code Playgroud)

io-redirection shell-script here-document

8
推荐指数
1
解决办法
8474
查看次数