Skip to content

Fix nella pipe per ripulire il file arc da caratteri spuri

A partire da issue earthworm/ew2openapi#26 (closed)

L'errore dipende da un'errata chiamata al comando tr nella pipe del docker_hyp2000 che cerca di rimuovere i caratteri spuri del file arc ma rimuovere anche qualche zero qua e là.

questa la pipe con errore

cat example/output/hypo.arc | tr '\0x00' ' ' | /Users/mtheo/svnwork/earthworm/bin/ew2openapi TYPE_HYP2000ARC - - | jq '.' | grep quakeId
EW_PARAMS is '/Users/mtheo/gitwork/_earthworm/tankplayer/run_configs/run_realtime/params/'
    "quakeId": 295,

così come dovrebbe essere cambiata

mtheo@thou:~/gitwork/_docker/docker_hyp2000 (master)*$ cat example/output/hypo.arc | tr '\0' ' ' | /Users/mtheo/svnwork/earthworm/bin/ew2openapi TYPE_HYP2000ARC - - | jq '.' | grep quakeId
EW_PARAMS is '/Users/mtheo/gitwork/_earthworm/tankplayer/run_configs/run_realtime/params/'
    "quakeId": 295075,