fermi

A minimalist calculator for estimating with distributions
Log | Files | Refs | README

commit a1e724924bd84c7c59b45026d47a77df631caad5
parent e0c570107becceb0e354861c9978b1c8350b4931
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date:   Fri, 10 May 2024 20:09:35 +0100

play around with bash/unix utilities

Diffstat:
AREADME.md | 15+++++++++++++++
Af.sh | 9+++++++++
Alog.f | 8++++++++
Amodel.f | 2++
4 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,15 @@ +To do: + +- [ ] Write README +- [ ] Add show more info version +- [ ] Add division? +- [ ] Read from file? +- [ ] Save to file? +- [ ] Program into a small device, like a calculator? +- [ ] Allow comments? + - Use a sed filter? + + +go run main.go < model.f +sed 's|//||' model.f | go run main.go + diff --git a/f.sh b/f.sh @@ -0,0 +1,9 @@ +#!/bin/bash +#while IFS= read -r line; do echo "$line" | sed 's| //.*||' | go run main.go + +# while IFS= read -r line; do echo "$line" | sed 's|//.*||'; done | go run main.go + + +sed -u 's|//.*||' | go run main.go +# ^ sed unbuffered. +# cat | tee -a log.f | sed -u 's|//.*||' | go run main.go | tee -a log.f diff --git a/log.f b/log.f @@ -0,0 +1,8 @@ +1 10 +=> 1.0 10.0 +1 100 +=> 2.4 415.0 +1 100 // +=> 1.0 100.0 +1 10 // hello world +=> 2.4 415.0 diff --git a/model.f b/model.f @@ -0,0 +1,2 @@ +1 10 +2 20