Mar
30

Where to Eat Ice Cream in Copenhagen

Paradis
Style: italian
Location: several location in Copenhagen, among other at Sankt Hans Torv 24, 2200 Kbh N.
Is á Bella
Style: Italian
Location: Smallegade 40 Frederiksberg C, 38 19 39 90

Pinocchio
Style: Italian
Location: Amagerbrogade 99, Amager, 32 97 93 93
Lydolphs Isbar
Style: Speciality is ‘Lydolpher’ complet with three bowl of ice cream, two flødeboller, lots of soft ice and more… Continue reading »

Mar
30

Calculate average using AWK

The average or arithmetic mean is given as

Assume we have an input file foo with f.ex. line number in first column and in the second column ($2 in awk) we have the values of interest.
File: foo
1 2
2 3
3 6
4 8
5 11
Use the following awk commando to calculate average or arithmetic mean
awk ‘{s+=$2} END{print “Sum: “s,… Continue reading »

Mar
30

Merge two files using AWK

We may use AWK to easily join two files. Assume we have input files foo and foo2
Content of foo
OSL 59.9 10.9
TRD 62.7 11.8
… and foo2
OSL 25 m
TRD 36 m
Join the two files with AWK commando
awk ‘NR==FNR{a[FNR]=$0;next} {print a[FNR],$2,$3}’ foo foo2
or
awk ‘{str=$2;str2=$3; getline < "foo";printf "%3s %3.1f %3.1f %2f %1s\n", $1,$2,$3,str,str2}' foo2 Output will be: OSL… Continue reading »

Mar
27

Protected: Helsestasjonen, bestemor og bestefar

There is no excerpt because this is a protected post.

Mar
26

Protected: Besøk av bestemor og bestefar

There is no excerpt because this is a protected post.

Mar
24

Protected: Min første trilletur

There is no excerpt because this is a protected post.

Mar
21

Protected: Min første kjøretur

There is no excerpt because this is a protected post.

Mar
20

Protected: Barnelege og masse besøk

There is no excerpt because this is a protected post.

Mar
19

Protected: Stemningsbilder første kvelden

There is no excerpt because this is a protected post.

Mar
19

Protected: Besøk av Beste og Christian

There is no excerpt because this is a protected post.

Older posts «