May 2017
Beginner
552 pages
28h 47m
English
We use curl to fetch the data from the dictionary API web page by specifying our API Key ($apikey), and the word we want the definition for ($1). The result contains definitions in the <dt> tags, selected with grep. The sed command removes the tags. The script selects the required number of lines from the definitions and uses nl to add a line number to each line.