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 mookie
6 days ago
tcl by schelte
10 days ago
tcl by schelte
11 days ago
tcl by mookie
15 days ago
tcl by mookie
17 days ago
tcl by mookie
21 days ago
tcl by mookie
21 days ago
tcl by Army
23 days ago
tcl by florentis
27 days ago
tcl by Florentis
32 days ago
Submit
New paste
Documentation
From Jabber