From eb52f0c8982136dc1a9eccd8fa118b284f7b7e6f Mon Sep 17 00:00:00 2001 From: Simon Archieri Date: Wed, 2 Jan 2019 16:47:48 +0100 Subject: [PATCH] Add a filter to skip commented line in /etc/hosts --- deployLXCdevContainers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployLXCdevContainers.sh b/deployLXCdevContainers.sh index e4a08d8..e762c44 100755 --- a/deployLXCdevContainers.sh +++ b/deployLXCdevContainers.sh @@ -71,7 +71,7 @@ echo Done echo ------------------------------------ echo "Add opv_master line in /etc/host" -lineOpvMaster=`cat /etc/hosts | grep opv_master -n | awk '{print $1}' FS=":"` +lineOpvMaster=`cat /etc/hosts | sed "s/#.*//g" | grep opv_master -n | awk '{print $1}' FS=":"` for i in $lineOpvMaster do