Comments (2)
I think this can be solved with something like this:
numberOf=$(cat $blacklist | sed '/^\s*$/d' | wc -l)
I'll test it some more
from pi-hole.
I tested a lot on the Mac and was using this sed 's/^[ \t]*//'
to eliminate the tab in front of the number when using wc
. It doesn't seem that the Raspbian version of wc
has that, so the solution above should work for all the numberOf
variables, while accounting for blank lines if they happen to exist.
from pi-hole.
Related Issues (20)
- Hostnames not resolving on Dashboard tab for ipv6 devices HOT 6
- Querylog All Queries Same Host Problem HOT 1
- V6/Does not block anymore HOT 7
- Restore does not include static dhcp leases without ip HOT 3
- Temperature keeps reverting to Celsius from Fahrenheit when updating HOT 27
- Ads Not Blocking Properly in Pi-hole Docker HOT 6
- dnsmasq: failed to create listening socket for port 53: Address already in use HOT 4
- Blank admin PHP pages caused by empty persistentlogintoken file (includes fix) HOT 1
- Installation fails HOT 1
- Install: Check for valid upstream DNS IP addresses excludes IPv6 HOT 4
- (development-v6) cannot update FTL on arm device HOT 1
- (development-v6) cannot update FTL on amd64 device HOT 4
- Intermittent issues using custom dns_records HOT 2
- In an LXC container, the website displays a ‘load average’ that is very different from top HOT 7
- FTL database shouldn't be readable by unprivileged users HOT 6
- Raspberry Pi 5 having trouble binding interfaces when using NetworkManager HOT 1
- Update of pi-hole not possible on Linuxmint 6 (Debian) HOT 2
- pihole -v shows update available but pihole -up doesn't HOT 6
- Default list author fine with breaking functionality -- suggest finding alternative HOT 4
- Dashboard hanging HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pi-hole.