diff options
author | Igor Galić <i.galic@brainsware.org> | 2016-07-26 00:01:57 +0200 |
---|---|---|
committer | Raphaël Pinson <github+aem1eeshi1@raphink.net> | 2016-07-26 00:01:57 +0200 |
commit | aeff226c587ec52adfdadc707ab97028c7ccaf9d (patch) | |
tree | 39076a64152835f26d505b6ff4481f748f167e34 | |
parent | bfcf8c808bbc2afbdb7fcd548d10eb03871461d8 (diff) |
only use awk, instead of grep and awk (#9)
This reduces a pipe, by only using `awk` for both of operations that of `grep`, and that of `awk`.
-rw-r--r-- | lib/facter/systemd.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/systemd.rb b/lib/facter/systemd.rb index b4b11fb..d488efb 100644 --- a/lib/facter/systemd.rb +++ b/lib/facter/systemd.rb @@ -30,6 +30,6 @@ end Facter.add(:systemd_version) do confine :systemd => true setcode do - Facter::Core::Execution.exec("systemctl --version | grep 'systemd' | awk '{ print $2 }'") + Facter::Core::Execution.exec("systemctl --version | awk '/systemd/{ print $2 }'") end end |