xlog-discussion
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xlog-discussion] Re: serial numbers from xlog


From: Daniel Schlieper
Subject: [Xlog-discussion] Re: serial numbers from xlog
Date: Wed, 10 May 2006 16:32:02 +0200 (CEST)

Hi there,

the solution was rather simple: have a shell script that counts the xlog 
file lines and adds 599000:

serial.sh

#! /bin/bash 
echo $(echo "599000 +" $(cat /home/daniel/.xlog/test.xlog | wc -l) | bc)

And run $(/fullpath/serial.sh) in a gmfsk macro.

Of course, that is very crude. I should not hardwire the RST. And allow 
for the case that the serial number has 4 digits or more. And of course, I 
shouldn't use a work-around, but use the internal communication channels 
between xlog and gmfsk. But the contests starts in a few hours...

73 de Daniel, M0ERA
 
On Wed, 10 May 2006, Daniel Schlieper wrote:

> Hello,
> 
> I had a weird idea to get serial numbers for a contest: Make xlog to write 
> after every qso, and then just add the line number to 599000. Using bash, 
> it would look like this:
> 
> $ echo "599000 +" `cat /home/daniel/.xlog/test.xlog | wc -l` | bc
> 
> or, if you prefer $() notation:
> 
> $ echo "599000 +" $(cat /home/daniel/.xlog/test.xlog | wc -l) | bc
> 
> However, if I use this as macro in gmfsk
> 
> $( $( echo "599000 +" $(cat /home/daniel/.xlog/test.xlog | wc -l) | bc ))
> 
> ... I fail to get a 599003 or whatever, but some error messages about 
> "failed to execute child process".
> 
> I agree that the whole idea is crude and not worth following up, there are 
> certainly elegant ways for directly getting a QSO number from xlog.
> 
> 73 Daniel M0ERA, Oxted, Surrey 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]