awk instead of sed
Posted to
bogusest
by Bradipo at Tue Apr 05 19:49:39 GMT 2022
view raw
$ cat token.awk
/NEKOT/ {
printf("y\nz\n");
next
}
/TOKEN/ {
printf("a\nb\n");
next
}
{
print
}
$ awk -f token.awk input.txt
0
y
z
1
a
b
2
Recent Posts
tcl by Stu
1 days ago
tcl by rhobart
14 days ago
tcl by stevel
18 days ago
tcl by dandyn
26 days ago
tcl by dandyn
26 days ago
tcl by dandyn
26 days ago
tcl by dandyn
28 days ago
tcl by dandyn
28 days ago
tcl by emiliano
39 days ago
tcl by dandyn
39 days ago
Submit
New paste
Documentation
From Jabber