Domanda

I have to create a large amount of docx files for work. I figured instead of doing it manually, I could use git bash and create all of them through a loop. I have pretty basic knowledge of it, so I hope I'm not asking something too stupid.

I just did a little test, running:

echo "Hi" > hi.docx

It created a file represented by a little Word icon, but I can't open it. Is there a way to create an actual docx file in bash that will just open as a blank Word document?

È stato utile?

Soluzione

Is there a way to create an actual docx file in bash that will just open as a blank Word document?

No sure how to create word document in bash, but if you just want to create some blank word document, you can manually create an empty document, then copy it to different file names.

one example to copy empty word document to files as 1.docx 2.docx ... 9.docx

for i in {1..9}; do cp empty.docx $i.docx; done
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top