我有一个程序可以将信息写入stdout和stderr,并且我需要grep通过什么来到stderr,而忽略了stdout.
我当然可以分2步完成:
command > /dev/null 2> temp.file
grep 'something' temp.file
Run Code Online (Sandbox Code Playgroud)
但我宁愿能够在没有临时文件的情况下做到这一点.有没有任何智能管道技巧?
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 …