I’m not a fan of most programming courses, so I decided to write my own guide.

My hard drive is full so, I want to analyse which directories contain the biggest files.

I remember from Small, Sharp Software Tools that there are command line tools you can use to do exactly that.

This looks like a table. Where have I analysed tables before? A Data-Centric Introduction to Computer Science!

So, how can we improve the list’s readability?

teaching computation as a social practice

PLAI

7.2 Shell Scripting

While most programmers have never programmed in Haskell before, many have programmed in a lazy language: the language of most Unix shells. In this text we’ll use the language of bash (the Bourne Again Shell), though most of these programs work identically or have very close counterparts in other popular shell languages. The classical shell model assumes that all programs can potentially generate an infinite stream of output. The simplest such example is the program yes, which generates an infinite stream of y’s:

Bash Scripting

Knowing UNIX commands eliminates having to reinvent the wheel.

In order to perform a simple file sort, you could write:

  • 35 lines of Python
  • 19 lines of Perl
  • 73 lines of Java
  • 1 line of UNIX commands

links

where to save bash scripts

Computer scientists use a variety of techniques for capturing the meaning of a program, all of which rely on the following premise: the most precise language we have is that of mathematics (and logic).