Home About Meetings FOSS

June 13 2023 Le potato, AWK, dBASE

Posted on June 14, 2023
( 8 minute read )

David unboxed and unwrapped the Libre Computer Board AML-S905X-CC, otherwise known as ‘Le potato’, which he had ordered. It had cost around £30, that is, rather less than a Raspberry Pi 3, and had come from Ali Express in about two weeks. He had also bought an Orange Pi 4 LTS for the same money but it did not work. On checking he had found that it draws 1/4amp. He would like to run both from the same power source. Brian suggested that he return the Orange Pi to Ali Express and tell them it did not work.

This led into an extended discussion about the merits of various versions of the Raspberry Pi, etc.

Brian then asked David if he had managed to get Home Assistant to control any of the thermostatic radiator valves he had bought and David showed one of them and the display in Home Assistant.

Brian went on to ask about copying data from a large to a smaller drive and John recommended

rsync -av [source] [destination]

Darren described how he had received an email asking for a document related to statistics gathering by the OU. He thought that the document was either in his Kmail inbox or in an archive of it. He unpacked the archive and found a folder with three sub-folders, two of them empty. Finding the full one, he then executed the following AWK script:

awk '/.slc.co.uk/{print "#"} '

However, what it really does is indicate something like slc.co.uk where it appears on a line of input. So he got a blank screen with a border of #s down one side to indicate the size of the problem.

Next he tried something that printed the names of the files that contain dsa_team@slc.co.uk. Easy he thought. Nope. He tried several times for about an hour. Then finally ...

awk 'dsa_team@slc\.co\.uk/ {print(FILENAME) } ' *

produced a small list of file names that he loaded into Kmail, one by one. They were all roughly the right thing, but not what he wanted. Then he remembered that the last time he was in this kind of bother the dsa team would send a duplicate renewal letter to you if you lose it!

Bernard wondered why he had not used grep rather than AWK and Darren said that doing it in AWK had been an exercise in itself.

Darren also raised the possibility of publicising the LUG through journals like Linux Journal, Linux Magazine — which contains a section provided by the Linux Voice contributors — or LinuxFormat in order to attract new members — which prompted a discussion on whether face-to-face meetings are attractive to people now that there is so much online.

John then tried to pick up David sharing the dBASEIII disk at the previous meeting by doing a presentation based on this paper but he was plagued by a series of technical problems. The main points were that dBASE

Brian asked John what he had used it for. Originally, John had used it for the lists of books he used as a lecturer but then he had used it for addresses, for a diary/calendar, for an accounts program, for a membership program and for a conference booking program. A great advantage was that you could write programs which were like libraries which you could use in a variety of different programs.

Because dBASEII was not compatible with dBASEIII or dBASEIV, he had continued to use dBASEII until he moved to Linux when he had found that it was very easy to export dBASE tables in a form that could be imported into SQL and so he had been able to continue to use his dBASEII data.

In response to a question about whether he had used dBASEII recently, John said that he had when someone gave him an Excel file with hundreds of dates in it inconsistently entered. He had realised that it would be quicker to put the data into a dBASEII table and write a dBASE program to read the dates and restructure them all into a consistent format.

John mentioned that one reason for not moving to dBASEIII was that dBASEII had had a function similar to the SQL LIKE which was not available in dBASEIII. Wayne Ratliff had had nothing to do with the move to dBASEIII and subsequently left the company and wrote Emerald Bay of which he was later to say that the authors of Emerald Bay and Access must have been reading from the same book.