by OJFord · 5y ago · 0 comments
export $(sudo cat <protected_credentials_file> | xargs)
Is that the same as sudo cat f | xargs export?If so, I think an important difference is that mine won't hide the exit code, and you can then answer a sibling commenter (on forgetting without checking) with 'I omitted set -e at the top'.
It looks like in this example it's used simply to trim whitespace. E.g.
$ echo ' hello ' | xargs
hello