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 JMN
8 mins ago
tcl by JMN
9 hours ago
tcl by mookie
1 days ago
tcl by ACfromTX
12 days ago
tcl by emiliano
13 days ago
tcl by mookie
14 days ago
tcl by schelte
17 days ago
tcl by oldlaptop
30 days ago
tcl by mookie
36 days ago
tcl by dandyn
43 days ago
Submit
New paste
Documentation
From Jabber