BEGIN { print ".SH" print ".CE 1" printf("\\s+9Seating Plan\\s0\n") print ".LP" system("date '+%Y-%m-%d %H:%M'") print ".sp 2" print ".PS 6i" print "down" } { name[NR] = $0 } END { j = 1 while (getline <"seats") { i++; if ($0 == "*") { printf("box \"%s\"\n", name[j++]); } else { printf("box \"%s *\"\n", $0); } if (i == 8) { print "move right" } if (i == 12) { print "move right; up" } } print ".PE" print ".LP" print ".sp 2" print "(With * marked persons have fixed seats.)" }