[svlug] Weird issue, command output unable to pipe or capture
Robert Freiberger
rfreiberger at gmail.com
Wed Apr 18 21:01:57 PDT 2018
Hello,
I've stumbled across a strange issue and wasn't sure if I'm overlooking
something very simple. The problem is at work we have an application
written in Ruby which is a wrapper for Chef knife command. It's pretty much
taking the Chef environments from our Chef org and building a set of
arguments.
For example:
$ foo dev-stage1 list
This would use the Chef knife command to query the hosts in the dev-stage1
environment and list them out. The problem is the output does not allow me
to pipe or capture in a bash variable "foo=$(foo dev-stage1 list)". Even
something like "$ foo dev-stage1 list > /tmp/foo" doesn't work either.
I also cannot grep the command output either, so I'm not sure if I'm doing
something wrong but I haven't seen this issue before. Trying to search this
problem doesn't provide the right result since it's not a grep issue but
the command output appears like it's not stdout (which I know doesn't make
sense).
Wonder if anyone else has seen this issue or give me a hint on my mistake?
Thanks,
Robert
--
Robert Freiberger
510-936-1210
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.svlug.org/archives/svlug/attachments/20180419/e4fa3c45/attachment.htm
More information about the svlug
mailing list