Comments (5)
Hi @microo8, GoAWK has never aspired to be compatible with Gawk and its vast suite of built-in functions, but rather with the much smaller POSIX spec. So just to set expectations, I'm probably not going to go down the track of adding Gawk's "standard library". However, I'm going to leave this issue open for a while to see if others have any comments.
To do what you're trying to do in a POSIX-compatible way you could shell out and use redirection, for example:
$ awk 'BEGIN { "date" | getline x; print "Date:", x }'
Date: Sat 16 Jul 2022 09:52:46 NZST
from goawk.
from goawk.
Ah yes, if you're using GoAWK as a Go package, that's an excellent use for Config.Funcs
-- nice! What is your use case, out of interest, and is it open source?
from goawk.
from goawk.
That sounds really neat, good work!
from goawk.
Related Issues (20)
- Ensure we use value of FS at the time the record was read
- Allow outputting to /dev/stderr on Windows HOT 14
- Missing support for json input files HOT 1
- CSV - loss of double quote when dataset is updated HOT 2
- After Go 1.21 is out, build with PGO enabled HOT 1
- close() on pipe command does not return exit status HOT 2
- close() on input pipe does not cleanup child process HOT 5
- system() always returns -1 if process exits due to signal
- fflush() stops on first flush error HOT 2
- Add support for new \u Unicode escape sequence
- Windows error: flag provided but not defined: -encodedCommand HOT 3
- goawk CSV mode ignores specified field separator HOT 2
- Allow line break between `}` and `while` HOT 1
- parser: Discriminate between constant and dynamic regexps HOT 3
- Support for network? HOT 3
- What's the purpose of `testdata/echo` HOT 7
- {} behaves like 1, END{} doesn't exhaust input HOT 2
- Support for %i in format strings. HOT 3
- srand() initialization without an argument. HOT 1
- Test failures on Linux/i386 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goawk.