Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

KoT on JOL (LSJ?)

1 view
Skip to first unread message

librarian

unread,
Dec 15, 2008, 5:19:30 PM12/15/08
to
Hi all - George just posted this on JOL:

if anybody wants to speed up KoT, either get on lsj to get me the html
version or write
an awk script that will join 2 lines if the first line starts with Name:

I don't know what an awk script is, but perhaps others do?

LSJ, if you don't have George's e-mail, I can forward the file he is
asking for...

best -

chris

LSJ

unread,
Dec 15, 2008, 5:35:13 PM12/15/08
to

KoT has been in the html for some time now.

http://www.white-wolf.com/vtes/HTML/cardlist.html

Jakob Sievers

unread,
Dec 16, 2008, 2:48:07 AM12/16/08
to
librarian <auct...@superfuncards.com> writes:

> write an awk script that will join 2 lines if the first line starts
> with Name:
>

Uh, how about:

j@salty:~$ cat join.awk
#!/usr/bin/awk -f

BEGIN { s = 0 }
s == 0 && /^Name:/ { line = $0; s = 1; next }
s == 1 { printf line " "; s = 0 }
{ print }

# eof

j@salty:~$ cat test.txt
foo bar
Name: quux frob
snarf
blarg

j@salty:~$ ./join.awk test.txt
foo bar
Name: quux frob snarf
blarg

(though the OP probably had something more complicated in mind)

cheers,
-jakob

0 new messages