【发布时间】:2016-02-22 11:20:12
【问题描述】:
我有 csv 日志文件,我使用 ogr2ogr 将其转换为 GeoJSON,然后运行 sed 以清理 elasticsearch。具体来说:
ogr2ogr -f "GeoJSON" output.json input.csv
sed -i -e '1,4d' -e '$d' output.json # delete first four lines and last line
sed -i '1 i\[' output.json # insert line with '[' at beginning of file
我想在 NiFi 中运行这些命令,但我没有配置 ExecuteProcess。
【问题讨论】:
-
这个答案可能会对您有所帮助。 stackoverflow.com/questions/42443101/…
标签: bash sed dataflow ogr2ogr apache-nifi