[arm-allstar] Control characters in the /var/log/asterisk/astdb.txt file
David McGough
kb4fxc at inttek.net
Wed Jun 20 12:03:38 EST 2018
Jeff,
Here is a tiny C program I use to filter astdb.txt and other files.
root at admin:/dev-static$ cat filter.c
///////////////////////////////////////////////////////////////////
#include <stdio.h>
int main ()
{
int i;
while ((i = getchar()) > 0)
if ((i >= 0x20 && i <= 0x7e) || i == 13 || i == 10)
putchar (i);
}
///////////////////////////////////////////////////////////////////
...Copy and paste the above program code to a file (like filter.c) on your
system. Then, compile with:
gcc -O3 filter.c -o filter
...To use, do something like:
./filter < /var/log/asterisk/astdb.txt | grep DB0
73, David KB4FXC
On Wed, 20 Jun 2018, "Jeff via arm-allstar" wrote:
> Grep can not be used effectively in this daily updated file because it contains ascii control characters.Â
examples
2458|DB0FUE|438.625-|F�rth2524|W6SEL-R|444.1250+ DX-PiNOY�~Y|Sierra Vista, ArizonA27282|EB4CPK|<None>|Don Benito, Badajoz, Espa�a28261|SA3BDE|145.325Mhz|Bolln�s28298|K0JSC|Ca�on Gateway|Ca�on City, Coloradoetcetc
Dose anyone else care?
_______________________________________________
arm-allstar mailing list
arm-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2/3 web page - http://hamvoip.org
More information about the arm-allstar
mailing list