blob: d6f60f41a7b4e15b8a936db166286e2ec501f208 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"
|