icsearch issue
nathan-opscode edited this page Sep 12, 2010
·
1 revision
-q option suppresses only the header, and not the password prompt {{{ bryanm@prod-ops01:~/temp#### for host in `icsearch 'hostname:v*qa*' -a hostname -o -q` ; do echo ####host | sed -n /\*/p; done ****** }}} using '-p password -q' works, but then theres the password on the command line and all that jazz. {{{ --- /srv/icagent/bin/icsearch.orig 2008-01-16 20:40:23.000000000 -0800 +++ /srv/icagent/bin/icsearch 2008-03-07 11:21:52.000000000 -0800 @@ -71,5 +71,9 @@ unless config[:passwd] - config[:passwd] = HighLine.ask("Password: ") { |q| q.echo = "*" } + if config[:quiet] + config[:passwd] = HighLine.ask("") { |q| q.echo = false } + else + config[:passwd] = HighLine.ask("Password: ") { |q| q.echo = "*" } + end end }}}