Day 1: Dusty Shed

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

  • VegOwOtenks@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    1 day ago

    Shell

    Almost too easy, but I won’t be doing shell for the upcoming days.

    Part 1

    sed '/^$/d' input | sort | uniq -c | sort -d | tail -n 3 | cut -f 8 -d ' ' | paste -sd* | bc
    

    Part 2

    sed '/^$/d' input | sort | uniq -c | sort -d | head -n 3 | cut -f 8 -d ' ' | paste -sd* | bc