diff options
Diffstat (limited to 'postpost/adj_input.post_time')
-rwxr-xr-x | postpost/adj_input.post_time | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/postpost/adj_input.post_time b/postpost/adj_input.post_time new file mode 100755 index 0000000..d6f60f4 --- /dev/null +++ b/postpost/adj_input.post_time @@ -0,0 +1,15 @@ +#!/bin/sh +# usage: adj_input.post_time input.lpi input.post > modinput.post + +alles=$(grep -c ".*" $2) +ln=0 +for n in $(grep -n "period_stop\|t_stop" $2 | tr ":" " " | awk '{ print $1; }') +do + tail -n$[$alles - $ln] "$2" | head -n$[$n-$ln-1] + ln=$n + grep -n "period_stop\|t_stop" $2 | grep "^$n:" | tr " =:" ": " | awk '{ print $2 " :'$[$(grep "prop_stop" $1 | awk '{ print $3; }')-1]'"; }' | tr ": " " =" +# echo "period_stop = "$[$(grep "prop_stop" $1 | awk '{ print $3; }')-1] +done + +tail -n$[$alles-$ln] "$2" + |