| cat 000005.xml 000007.xml 000009.xml 000012.xml 000016.xml 000017.xml 000019.xml … awk スクリプト { "names": [ "000005.xml", "000007.xml", "000009.xml", "000012.xml", "000016.xml", …. ]} $ ls | awk 'BEGIN{printf("{\"names\": [\n")} {printf("\"%s\",\n", $1)} END{printf("]}\n")}' > annotations.json