> Well, this looks interesting. But the
> resulting file doesn't look exactly right, as it only gives the lines
> containing ",de" and the lines from arFile.txt in the right order.
You are right.
The "print $0" was at the wrong place it must be:
# gawk '{if (FILENAME == "arFile.txt") {a[NR]=$0} else {print $0;if
($0 ~ /,de/) {print a[++i] }} }' arFile.txt tutorial_part1.sgsl >
tutorial_part1.sgsl.new
--
Kai Antweiler
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel