play around with bash/unix utilities
This commit is contained in:
parent
e0c570107b
commit
a1e724924b
15
README.md
Normal file
15
README.md
Normal file
|
@ -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
|
||||||
|
|
9
f.sh
Executable file
9
f.sh
Executable file
|
@ -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
|
8
log.f
Normal file
8
log.f
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user