rec.games.trading-cards.jyhad

KoT on JOL (LSJ?)

3 messages from 3 participants · 15 December 2008 – 16 December 2008
original thread on Google Groups

librarian

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

[ quoted text not captured ] KoT has been in the html for some time now. http://www.white-wolf.com/vtes/HTML/cardlist.html

Jakob Sievers

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