1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Paul Armstrong's Shell Style Guide

This commit is contained in:
A Holt 2017-12-13 02:57:26 -05:00 committed by GitHub
parent 85c16b384c
commit 05e357cc7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,9 @@ echo "" >> iiab-network.log
if [ $OS == "centos" ] || [ $OS == "fedora" ]; then
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
fi
# Ubuntu desktop might be using NM - split out.
# Paul Armstrong's Shell Style Guide: https://google.github.io/styleguide/shell.xml
# if [ $(which nmcli) ]; then # syntax fails when multiple lines returned
# if [[ `which nmcli` ]]; then # syntax also works
if which nmcli; then # syntax works great, with "grep -q" too!