Skip to content

Instantly share code, notes, and snippets.

@nunq
Created June 9, 2021 21:16
Show Gist options
  • Save nunq/a19cf9fa82c52017cc6354271ff7c3f8 to your computer and use it in GitHub Desktop.
Save nunq/a19cf9fa82c52017cc6354271ff7c3f8 to your computer and use it in GitHub Desktop.
print precise age (precision: 9 after decimal point) in fish shell. replace date
while true
printf "%.11g\r" (echo "("(date +%s%5N)"-"(date -d '2000-01-01 00:01' +%s%5N)")/100000/60/60/24/365.25" | bc -l)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment