[arm-allstar] Control characters in the /var/log/asterisk/astdb.txt file

jumping_jackass at yahoo.com jumping_jackass at yahoo.com
Wed Jun 20 12:53:18 EST 2018


Thanks, 

worked perfect for my application.
KD6GDB


Pursuant to U.S. Code, title 47, Chapter 5, Sub-chapter II, ß227, "Any and all non-solicited commercial E-mail sent to this address is subject to a download and archival fee of $500.00 U.S.". E-mailing denotes acceptance of these terms. 

    On Wednesday, June 20, 2018, 10:03:39 AM PDT, David McGough <kb4fxc at inttek.net> wrote:  
 
 
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