I want to change a word in a .docx file using a shell command.I tried using the sed command, but it is not working.Does anyone know a solution for this?For example, I want to change a word (e.g. exp5) and replace that with another (exp3) in the file exo.docx.
How to replace a word inside a .DOCX file using Linux command line?
linux;text processing;microsoft word
So, you want to replace things in a brand-specific format? At the first look it looks bad, but the new docx format is a bit better for that than the old doc format, because it's actually a ZIP file containing XML files.So the answer lies in unzipping it, then you'll have to rummage through the files and figure out on which one to call sed and zip it up again.Check out the file word/document.xml in the ZIP file.