• 1 Post
  • 2 Comments
Joined 1 year ago
cake
Cake day: July 8th, 2023

help-circle
  • Thank you so much for the great explanation and taking the time to reply to my post! That is most certainly a more elegant solution!

    The du command does exactly what I and even the post author in the linked post to the course intended to do via a script! Though, I can imagine that the author just wanted to provide a quick example script for usage in the prompt.

    awk seems pretty interesting. Going a bit off-topic:

    Awk is a programming language that makes it possible to handle [simple, mechanical data manipulation] tasks with very short programs, often only one or two lines long. An awk program is a sequence of patterns and actions that tell what to look for in the input data and what to do when it’s found (p. iii).1

    Probably more needed in 1988 than today (due to fewer alternatives being available) it seems to still have good use cases. Also, there is a second edition in the works, even after 35 years! Last note: I know Brian Kernighan from his appearances on Computerphile 😁 .

    1Aho, A. V., Kernighan, B. W., & Weinberger, P. J. (1988). The AWK programming language. Upper Saddle River, NJ: Pearson.