From 6e6f2a19b63f1d38f6f356522ad364dc5ee44821 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 21 Dec 2016 16:56:27 +0000 Subject: [PATCH] Exclude comments --- src/freedombone-sec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/freedombone-sec b/src/freedombone-sec index 83d68ffa..45393c2c 100755 --- a/src/freedombone-sec +++ b/src/freedombone-sec @@ -752,12 +752,13 @@ function store_passwords { } function show_tor_bridges { - if ! grep "Bridge " /etc/tor/torrc; then + bridges_list=$(grep "Bridge " /etc/tor/torrc | grep -v '##') + if [ ${#bridges_list} -eq 0 ]; then echo $'No Tor bridges have been added' return fi clear - grep "Bridge " /etc/tor/torrc + echo "${bridges_list}" } function add_tor_bridge {