相关疑难解决方法(0)

如何管stderr,而不是stdout?

我有一个程序可以将信息写入stdoutstderr,并且我需要grep通过什么来到stderr,而忽略了stdout.

我当然可以分2步完成:

command > /dev/null 2> temp.file
grep 'something' temp.file
Run Code Online (Sandbox Code Playgroud)

但我宁愿能够在没有临时文件的情况下做到这一点.有没有任何智能管道技巧?

bash grep stdout pipe stderr

933
推荐指数
8
解决办法
38万
查看次数

如何抑制 aws lambda cli 输出

I want to use aws lambda update-function-code command to deploy the code of my function. The problem here is that aws CLI always prints out some information after deployment. That information contains sensitive information, such as environment variables and their values. That is not acceptable as I'm going to use public CI services, and I don't want that info to become available to anyone. At the same time I don't want to solve this by directing everything from AWS command …

aws-cli aws-lambda

11
推荐指数
1
解决办法
1804
查看次数

标签 统计

aws-cli ×1

aws-lambda ×1

bash ×1

grep ×1

pipe ×1

stderr ×1

stdout ×1