#!/bin/bash


#Opis: skrypt służący do pobierania definicji ze strony dictionaryapi.com


apikey=KLUCZ_DO_API


if [ $# -ne 2 ];


then


 echo -e "Użycie: $0 WORD NUMBER"


 exit -1;


fi


curl --silent \
 http://www.dictionaryapi.com/api/v1/references/learners/xml/$1?key=$apikey | \

grep -o \<dt\>.*\</dt\> | \

sed 's$</*[a-z]*>$$g' | \

head -n $2 | nl
