aardvark.code
 
12_append
20180224

Aardvark in append mode

What?

Normally when a filename occurs more than once in an aardvark file, it will get overwritten. But if you precede the filename with a plus-sign, aardvark will not attempt to overwrite the existing file but append to it.

Prerequisite

To run this aardvark.code example you need to have following software installed on your system:

Go aardvark

Grab this aardvark.code file:

wget http://data.munging.ninja/aardvarkcode/append/aardvark.code

Look at the file

Spot the '+' signs in front of the filenames (eg +spanish.txt )

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##== spanish.txt  =========================================================
El lago es el segundo lago más grande de América del Sur, 
localizado en la Patagonia y compartido por Chile y Argentina.

##== english.txt  =========================================================
The lake is the second biggest lake of South America, located 
in Pataganio and shared by Chile and Argentina.

##== nederlands.txt  ======================================================
Het meer is het tweede grootste meer van Zuid Amerika, gelocaliseerd 
in Patagonie and gedeeld door Chili en Argentinie.

##== +spanish.txt  ========================================================
A cada lado de la frontera tiene nombres diferentes: en Chile es 
conocido como lago General Carrera, mientras que 
en Argentina se le denomina lago Buenos Aires.

##== +english.txt  ========================================================
At both sides of the border it has a different name: in Chili it is 
known as Lake General Carrera, while in Argentina it is named
Lake Buenos Aires. 

##== +nederlands.txt  =====================================================
Aan beide zijden van de grense heeft het een verschillende naam: in Chile 
het is bekend als meer General Carrera, terwijl in Argentinie het 
meer Buenos Aires benoemd werd. 

Run aardvark

As you could have guessed, when you run aardvark on this file, you get 3 output files, each in a particular language.

Output: spanish.txt

1
2
3
4
5
6
El lago es el segundo lago más grande de América del Sur, 
localizado en la Patagonia y compartido por Chile y Argentina.

A cada lado de la frontera tiene nombres diferentes: en Chile es 
conocido como lago General Carrera, mientras que 
en Argentina se le denomina lago Buenos Aires.

Output: english.txt

1
2
3
4
5
6
The lake is the second biggest lake of South America, located 
in Pataganio and shared by Chile and Argentina.

At both sides of the border it has a different name: in Chili it is 
known as Lake General Carrera, while in Argentina it is named
Lake Buenos Aires. 

Output: nederlands.txt

1
2
3
4
5
6
Het meer is het tweede grootste meer van Zuid Amerika, gelocaliseerd 
in Patagonie and gedeeld door Chili en Argentinie.

Aan beide zijden van de grense heeft het een verschillende naam: in Chile 
het is bekend als meer General Carrera, terwijl in Argentinie het 
meer Buenos Aires benoemd werd. 
 
Notes by Data Munging Ninja. Generated on akalumba:sync/20151223_datamungingninja/aardvarkcode at 2018-02-24 12:57