lern – The Bash Flash Card Script

Martin Döring, September 18th of 2021

I wanted to learn a new language, but I did not find a satisfying solution for that. Anki drove me crazy in it's complexity and handling. So today I wrote my own intentionally minimalistic 80 lines flash cards script in bash. I named it »lern« which is German for »learn«, as you may have assumed. ;-)

For now it is a very simple learning algorithm. The code could be enhanced to save the progress in an extra file. Also for now there is no way to learn a subset, say just 30 records from 300. Best for now would be to structure you flash card files in a way, that every file is just about 30 records long.

How it works

The script works like this:

The running script looks like this:

CSV File Format

The file format for the vocabulary is simple: The CSV file has two columns with words or phrases to learn. Column »A« is the question asked and column »B« is the answer. Although, you can change this with the -r option and learn the other way round.

The first line of the file contains the languages to learn in column »A« and »B«. The csv file needs to be saved with embracing double quotes for every cell. The whole file looks like this, as an example:

Prerequisites

Features

Shortcomings

lern — The Bash Flash Card Script

If you have any suggestions, how to make the script even smaller or faster, just write me:

Martin Döring

——

back