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 hardkorebob
1 days ago
tcl by hardkorebob
1 days ago
tcl by iobates
2 days ago
tcl by mookie
3 days ago
tcl by mookie
3 days ago
tcl by sebres
4 days ago
tcl by iobates
6 days ago
tcl by iobates
7 days ago
tcl by mookie
7 days ago
tcl by mookie
7 days ago
Submit
New paste
Documentation
From Jabber