[Firewall] Possible bug in environment script

Arno van Amersfoort arnova at rocky.eld.leidenuniv.nl
Wed Mar 4 16:56:26 CET 2009

Could you provide the output of "some" wc example showing this 
behaviour? I think even a simple cut or awk would do the trick, as I 
recall having fixed something simular in the past.


Sinisa Vujic wrote:
> Hi all,
> I would like to point on possible bug in environment script, more 
> precisely how output from 'wc -l' isn't sanitized and this lead to 
> erroneous results on quite few places.
> Problem jumps to life only if you have an old router with ancient 
> coreutils like I do (rh9, kernel 2.4.32), version of wc in this package 
> returns result with tab or space (I didn't investigate further) 
> prepended to numeric.
> My solution is: wc -l |sed -e 's/^[[:space:]]*//; s/[[:space:]]*$//'
> Hope it helps someone.
> thanks,
> sv
> _______________________________________________
> Firewall mailing list
> Firewall at rocky.eld.leidenuniv.nl
> http://rocky.eld.leidenuniv.nl/mailman/listinfo/firewall
> Arno's (Linux IPTABLES Firewall) Homepage:
> http://rocky.eld.leidenuniv.nl

Arno van Amersfoort
E-mail    : arnova at rocky.eld.leidenuniv.nl
Donations are welcome through Paypal!
Arno's (Linux IPTABLES Firewall) Homepage:

More information about the Firewall mailing list