In 2002 stuurde een Russische studente haar postadres per e-mail naar een vriendin in Frankrijk, zodat die haar een Harry Potter-boek kon sturen. Helaas was het e-mailprogramma van de Franse vriendin niet ingesteld om Cyrillische letters weer te geven. In plaats daarvan produceerde het diakritische tekens uit de westerse tekenset. De Franse studente had de fout blijkbaar niet opgemerkt, kopieerde de letters en verstuurde het pakket.

Postmedewerkers hadden vrij snel door wat er gebeurd was, ontcijferden het adres en bezorgden het boek met succes bij de bestemmeling.
Het tekstbestand harry_potter.txt bevat informatie over personages uit de Harry Potter boeken en films. De eerste regel bevat een hoofding. Elke volgende regel bevat gegevens over één personage, bestaande uit tien tekstvelden die telkens van elkaar gescheiden worden door een puntkomma (;):
Name: naam
Gender: geslacht (Male = man; Female = vrouw)
House: afdeling; de vier afdelingen van Zweinstein, waar Harry Potter school loopt, zijn Gryffindor, Hufflepuff, Ravenclaw en Slytherin, elk vernoemd naar een oprichter en elk met hun eigen kenmerken
Wand: soort toverstok
Patronus: beschermende kracht
Species: soort wezen
Loyalty: loyaliteit
Skills: vaardigheden
Birth: geboortedatum
Death: sterfdatum
Alle puntkomma's zijn scheidingstekens: er komen geen puntkomma's voor als inhoud van de velden. Sommige velden kunnen leeg zijn. De velden met de loyaliteit (Loyalty) en de vaardigheden (Skills) kunnen meerdere deelvelden bevatten, die telkens van elkaar gescheiden worden door een verticale streep (|). De hoofding bevat de namen van de velden, en ook die worden van elkaar gescheiden door een puntkomma (;).
Gevraagd wordt om — gebruikmakend van de teksteditors vi of vim — een reeks commando's op te stellen die achtereenvolgens de volgende opdrachten uitvoeren. Probeer voor elke opdracht zo weinig mogelijk commando's te gebruiken en zorg er voor dat elk van deze commando's uit zo weinig mogelijk tekens bestaat. De commando's mogen geen programmeerbare filters (bv. awk) gebruiken. Alle opdrachten moeten na elkaar uitgevoerd worden. De opdrachten mogen de eerste regel (hoofding) niet wijzigen, tenzij dit expliciet anders vermeld staat. Ter controle kan je gebruikmaken van de meegeleverde bestanden harry_potter.i.txt (ZIP), die telkens de inhoud van het bestand bevatten nadat de $$i$$-de opdracht werd uitgevoerd.
Als er minstens één spatie voorkomt in de naam van een personage (Name), behoud dan enkel het deel van de naam voor de eerste spatie en het deel van de naam na de laatste spatie. Die twee delen moeten van elkaar gescheiden worden door één spatie. Zo moet
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth;Death Harry James Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980; Ronald Bilius Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980; Hermione Jean Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979; Albus Percival Wulfric Brian Dumbledore;Male;gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time;Late August 1881;30 June, 1997 Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|above average strength|crossbowmanship;6 December, 1928; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980; Fred Weasley;Male;Gryffindor;;;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978;2 May, 1998 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978; Ginevra (Ginny) Molly Weasley;female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981; …
omgezet worden naar (harry_potter.1.txt)
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth;Death Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980; Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980; Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979; Albus Dumbledore;Male;gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time;Late August 1881;30 June, 1997 Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|above average strength|crossbowmanship;6 December, 1928; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980; Fred Weasley;Male;Gryffindor;;;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978;2 May, 1998 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978; Ginevra Weasley;female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981; …
Als het eerste karakter van een veld of een deelveld een kleine letter is, zet die kleine letter dan om naar zijn corresponderende hoofdletter. Zo moet
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth;Death Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980; Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980; Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979; Albus Dumbledore;Male;gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time;Late August 1881;30 June, 1997 Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|above average strength|crossbowmanship;6 December, 1928; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980; Fred Weasley;Male;Gryffindor;;;human;dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978;2 May, 1998 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978; Ginevra Weasley;female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981; …
omgezet worden naar (harry_potter.2.txt)
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth;Death Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980; Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980; Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979; Albus Dumbledore;Male;Gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time;Late August 1881;30 June, 1997 Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;Albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|Above average strength|Crossbowmanship;6 December, 1928; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980; Fred Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978;2 May, 1998 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978; Ginevra Weasley;Female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981; …
In vi en vim wordt alles wat je in de vervangterm tussen \U en \E zet omgezet naar hoofdletters.
Maak het veld met de geboortedatum leeg als de geboortedatum niet opgemaakt is volgens het formaat dag maand, jaar. Hierbij moet op de plaats van dag een natuurlijk getal staan tussen 1 en 31 en op de plaats van jaar een natuurlijk getal tussen 100 en 9999. Beide natuurlijke getallen moeten weergegeven worden zonder voorloopnullen. Op de plaats van maand moet de Engelstalige naam van een maand staan, die begint met een hoofdletter gevolgd door kleine letters.
January, February, March, April, May, June, July, August, September, October, November, December
Let ook op de komma na de naam van de maand. Verwijder het veld met de sterfdatum, ook in de hoofding. Zo moet
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth;Death Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980; Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980; Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979; Albus Dumbledore;Male;Gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time;Late August 1881;30 June, 1997 Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;Albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|Above average strength|Crossbowmanship;6 December, 1928; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980; Fred Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978;2 May, 1998 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978; Ginevra Weasley;Female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981; …
omgezet worden naar (harry_potter.3.txt)
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980 Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980 Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979 Albus Dumbledore;Male;Gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time; Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;Albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|Above average strength|Crossbowmanship;6 December, 1928 Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980 Fred Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 Ginevra Weasley;Female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981 …
Verwijder alle mannelijke personages (Gender: Male) die meer dan één vaardigheid hebben, en alle vrouwelijke personages (Gender: Female) die minder dan twee vaardigheden hebben. Hierbij wordt het aantal vaardigheden van een personage geteld als het aantal deelvelden van het veld Skills. Zo moet
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth Harry Potter;Male;Gryffindor;11" Holly phoenix feather;Stag;Human;Albus Dumbledore|Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Parseltongue|Defence Against the Dark Arts|Seeker;31 July, 1980 Ronald Weasley;Male;Gryffindor;12" Ash unicorn tail hair;Jack Russell terrier;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Wizard chess|Quidditch goalkeeping;1 March, 1980 Hermione Granger;Female;Gryffindor;10¾" vine wood dragon heartstring;Otter;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Almost everything;19 September, 1979 Albus Dumbledore;Male;Gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time; Rubeus Hagrid;Male;Gryffindor;16" Oak unknown core;None;Half-Human/Half-Giant;Albus Dumbledore|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Resistant to stunning spells|Above average strength|Crossbowmanship;6 December, 1928 Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980 Fred Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 Ginevra Weasley;Female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981 …
omgezet worden naar (harry_potter.4.txt)
Name;Gender;House;Wand;Patronus;Species;Loyalty;Skills;Birth Albus Dumbledore;Male;Gryffindor;15" Elder Thestral tail hair core;Phoenix;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Considered by many to be one of the most powerful wizards of his time; Neville Longbottom;Male;Gryffindor;13" Cherry unicorn hair;Non-corporeal;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Herbology;30 July, 1980 Fred Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 George Weasley;Male;Gryffindor;;;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Beater;1 April, 1978 Ginevra Weasley;Female;Gryffindor;;Horse;Human;Dumbledore's Army|Order of the Phoenix|Hogwarts School of Witchcraft and Wizardry;Chaser|Bat-Bogey hex;11 August, 1981 Dean Thomas;Male;Gryffindor;;;Human;Dumbledore's Army|Hogwarts School of Witchcraft and Wizardry;Chaser; Seamus Finnigan;Male;Gryffindor;;Fox;Human;Dumbledore's Army|Hogwarts School of Witchcraft and Wizardry;Pyrotechnics; Remus Lupin;Male;Gryffindor;10¼" Cypress unicorn hair;Wolf;Werewolf;Order of the Phoenix;Exceptionally gifted in Defence Against the Dark Arts;10 March, 1960 Peter Pettigrew;Male;Gryffindor;9¼" Chestnut dragon heartstring;None;Human;Lord Voldemort|Death Eaters;Animagus; …
Zet de volledige inhoud om naar een array van personages in JSON-formaat (JavaScript Object Notation), waarbij elk personage een object is met drie velden: name, gender en skills. De waarde van die velden moet resp. overgenomen worden uit de velden Name, Gender en Skills. We moeten exact deze JSON-array krijgen (harry_potter.5.txt)
[
{
"name": "Albus Dumbledore",
"gender": "Male",
"skills": "Considered by many to be one of the most powerful wizards of his time"
},
{
"name": "Neville Longbottom",
"gender": "Male",
"skills": "Herbology"
},
…
{
"name": "Dobby",
"gender": "Male",
"skills": "A type of magic specific to house-elves, performed without a wand which includes the ability to apparate, disarm and make objects levitate"
},
{
"name": "Kreacher",
"gender": "Male",
"skills": "Magic performed without a wand which includes the ability to apparate, disarm and make objects levitate"
}
]
Hierbij zit de array ingesloten tussen de vierkante haakjes ([ en ]) op de eerste en de laatste regel. Elk object in de array zit ingesloten tussen accolades ({ en }) die elk op een afzonderlijke regel staan en voorafgegaan worden door een insprong van twee spaties. De objecten worden van elkaar gescheiden door een komma op dezelfde regel als de accolade die het object afsluit. Merk op dat er na het laatste object geen komma staat (voorlaatste regel van JSON). De inhoud van een object bestaat uit een reeks naam/waarde-paren. De naam en de waarde staan tussen dubbele aanhalingstekens, en worden van elkaar gescheiden door een dubbelpunt (:) en een spatie. Elk naam/waarde-paar staat op een afzonderlijke regel en wordt voorafgegaan door een insprong van vier spaties. Alle naam/waarde-paren van een object eindigen met een komma, behalve het laatste naam/waarde-paar van het object.
In vi en vim worden regeleindes (newlines) in de vervangterm voorgesteld als \r. De voorstelling \n wordt in de vervangterm gebruikt voor null bytes (0x00).