Skip to content

Instantly share code, notes, and snippets.

View dbuse's full-sized avatar

Dominik S. Buse dbuse

View GitHub Profile
@dbuse
dbuse / Makefile
Last active May 7, 2019 15:33
Convert OMNeT++ .vec files into long-format (tidy) csv file
# Convert OMNeT++ .vec files into long-format (tidy) csv file
#
# The vector data first needs to be sorted by vector (first field) for join to work
%.vecdata: %.vec
grep -v '^vector\|attr\|version\|param\|run' $< | grep -v '^$$' | sort -k 1n > $@
%.vecmatch.join: %.vec
grep '^vector' $< | grep -v '^$$' | sed 's/vector\s\+\([0-9]\+\)\s\+\([^ \t]\+\)\s\+\([^ \t]\+\)\s\+[ETV]*/\1\t\2\t\3/' > $@