Skip to content

Instantly share code, notes, and snippets.

@andreoss
Created June 26, 2020 02:25
Show Gist options
  • Save andreoss/bc6b7b2e86c452302956d490d0d2aeb4 to your computer and use it in GitHub Desktop.
Save andreoss/bc6b7b2e86c452302956d490d0d2aeb4 to your computer and use it in GitHub Desktop.
tail recursive and cached
#!/bin/sh
_() { echo $(awk 'END{x=$2;$2=$3;$3=x+$2;print}' < "$0")| tee -a "$0" ; }
: 0 1 | _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment