Words Myte Bite

Funny can be whatever you want it to be. The Words and Musings of Paul O'Malley. Sort of a Blog!

Archive for the 'Software' Category

05 April
Comments Off

Fun bits of Bash / Awk Shell Fun

Without going into the why’s I thought I would publish these few lines to amuse some of the people I know get the odd ping from this blog.

There are a long list of numbers in Subt, I want to get a running total (that is the awk bit).

Not only that but then I padded all the lines using printf  so that if they were not nine digits long they were padded in front of them.

cat Subt | awk ‘{s+=$1} {print s}’ | xargs  printf “%09d\n” > RunningT

Had I wanted a total then this would have worked:

cat Subt | awk ‘{s+=$1} END {print s}’ > FileContainingTotal

How to select a variable from a long list using a simple gui command.

(the file RunningT is several hundred lines long)

kdialog –menu “select your amount” $(cat RunningT) –geometry 700×400

(no I don’t know how to do that with zenity, or even if it can be done {yay for kludge})

Now if that is not enough fun, get a giggle at this one:

cat RunningT | awk ‘{ print FNR “\t” $0 }’ > foo

Yes folks we can add an  line number to the file RunningT and create a new file called foo for no good reason.

The ways you can do this are many.

Cut lines off top of file three of them and park them somewhere.
head -n3 SourceForComputation > HeaderPrep

tail does the other end of the file

One of the problems I had with this little adventure was to insure that specific content was always placed in the the file but it could be scattered around the place (I would be splitting the file later)

You can use sort, however that might put your data in a strange place.

So grep for that special_data to extract it  and redirect it to a holding file.

Fine how do you remove specific data from a file so you don’t duplicate your processing of it?

grep -Ev What\ I\ Want\ Removed  File-to-remove-data-from > Result


(woops I had first published this as Ve)

and we get a Result

Anyway that was just a few notes on the fun parts of processing data using bash and awk

03 August
Comments Off

Tuesday’s thought for the day

Open Streetmap (OSM) whose web site is unsurprisingly  http://www.openstreetmap.org is a user generated site, you too can contribute. I live in Dublin, Ireland and one of my pal’s is a prolific cartographer on OSM. This got me thinking, here are people all around the world doing things in a common way by mutual agreement for a common objective. It is a bit like Free Software projects in general.

I am going to suggest that the data gathered by the Irish Government belongs to the Irish People it should be made available (within the parameters of the law) so that people in this country can exploit it in business or for other purposes that may help the Irish Economy grow. An obvious example is the OSI which is a government based monopoly which appears to generate cash, it would be nice to see what parts of it are really cash generating, and not just public monies being moved like wooden dollars. Wooden dollars are money you never get but appears on your bottom line as though you earned it, for instance recharging things within a company, a division could look very profitable but when you take away the “super charge” they are raising against other departments they could be found to be just providing a necessary service and charging a lot for it.

Lets think medical for a moment, imagine if no matter where you walked into a surgery or hospital in your country the doctor that sees you can see your history, perhaps they have to have an id card or code to get that information made available to them, or have an emergency procedure to access it if you turn up unable to help them to help you. That kind of information flow would hugely facilitate the level of important data that a patient may forget due to the stress or trauma they are undergoing.

What blocks this kind of thing?

Incompatible systems all claiming to help the data owner in each location manage their data but preventing the information help the public for whom all the services should be working to help.

Lets look at academia, the person who writes a paper and submits it to a peer review journal gets lauded for their important paper which then goes on to be quoted by others in the field. That looks great, however here is the cost to society, society paid for the research, it got owned by some publication which then places constraints on the author and their organisation as the originating body has to pay a high price for the peer reviewed journal.

The thoughts that follow on from this is that these things seem to be to be overly complex expensive costs to society, society has already paid to gather this data, it should be released for a nominal fee, the work is done, the payment for that work has already been made, society can benefit from the labours of those it has employed then it should there is a thing called innovation, but if you make the cost of entry too high people can’t innovate. Innovation is small incremental improvements on what went before.

Before I start delivering a full blown lecture I will stop here. ;-)

08 July
Comments Off

Stating the obvious about Microsoft

They don’t have a working implementation of OOXML version in the market place, the version of a “standard” they fought for a long time to make a standard.

(in the process a lot of hot air passed on and it has been claimed that the ISO system is now a victim of this standard lying face down in the dirt with a knife called OOXML in it’s back)

There are real implemented standards, so it is possible, ODF.

Both ISO standards, you can choose to use a standard but there is only one implemented!

(if you can  on show me I am wrong I’ll gladly publish the comment)

Were the actions taken to get OOXML turned into a standard an abuse of the power of a single player in the market place?

If the answer is yes, where are the regulators.

04 July
Comments Off

Software And Business Method Patents Are A Bad Idea

In a world of business method patents this is possible:
A Great Business Method Patent Joke

Business method patents allow the state to give someone a monopoly on a how they might do business.

Those pushing for their acceptance and those considering their acceptance should be aware of the fact that in the US the landscape has changed somewhat since a Supreme Court Judgement in a case commonly known as the “Bilski case”.

Groklaw article on Bilski.

It has been said that the patents and copyrights are heading  in a direction that might be compared with buying a car from a garage and finding you might only be able to get that car fueled in a garage of that brand. Work out how restrictive that would be, do you find that acceptable?

30 May
Comments Off

BSA in Czech Republic need to be pointed at

The Czech Republic Ministry of Finance And the BSA came up with this brilliant idea (ok that is a scarcastic comment):


No tax relief on hardware bought without software on it. I don’t know about you but I try to buy “white boxes” as they used to be called, that is hardware built to my spec with no software on it, why because I use GNU/Linux.

Why, not just as a hobby, where I work we save in excess of a hundred thousand euros because we can, by not paying Microsoft for their software and using as a viable alternative GNU/Linux.

Where I am it is not an IT or Web company, it is a service company with people doing administrative work and one IT person, me. We manage lots and do almost all of it with GNU/Linux, it really is that simple. Why do we have any Microsoft software at all? Because some external suppliers require it, because they are not neutral in the way they build web sites, yuk.

However they are few and far between. At least we have some competitive advantage in that we can claim these expenses. I hope the person who made that decision in the Czech republic ends up understanding what they are doing to their own economy, piping money out for no internal gain, great trick if you can do it.