Skip to main content

Intro

In this lesson we will study the scripts that solve some simple problems:

  • A script that gets as argument the URL of a web page and returns all the URLs inside that page.

  • A script that gets as argument the URL of a web page and returns a list of the 100 most frequently used words inside it.

  • A script that calculates the Fibonacci numbers, using an iterative algorithm.

  • A script that solves the problem of Towers of Hanoi, using a recursive algorithm.

  • A script that collects web pages from the internet, starting from a root page, extracts the words in each page, and creates a list of words.

note

Let's get first the examples:

mkdir -p examples  &&  cd examples/

wget https://linux-cli.fs.al/examples/lesson15.tgz

tar xfz lesson15.tgz

cd lesson15/ && ls
Loading asciinema cast...