Statistics
| Branch: | Revision:

root / src / utils / splitvec @ cbd2c699

History | View | Annotate | Download (399 Bytes)

1 01873262 Georg Kunz
#!/usr/bin/awk -f
2
#
3
# Splits an output vector (.vec) file into files with one vector in each
4
#   ie: foo.vec --> foo-1.vec, foo-2.vec, foo-3.vec,...
5
# --VA
6
#
7
/^vector/	{
8
			basefname=FILENAME
9
			gsub( "\.[^.]*$", "", basefname );
10
			fname[$2] = basefname "-" $2 ".vec"
11
			print "creating file `" fname[$2] "'"
12
			print "# " $0 > fname[$2]
13
		}
14
/^[0-9]/	{
15
			print $2 "\t" $3 "\t" $4 >> fname[$1]
16
		}