Apagada docs

Aprendiendo a programar el pasado

Herramientas de usuario

Herramientas del sitio


Find zip files containing fonts

This makes use of 7zip to extract files and sed to process the output. Both are external utilities. It is usual to find these files in unix but not in windows. But you can find them online.

7zip l *.zip *.ttf |sed -ne "/Path.*$/h;/ttf/{;p;g;p;};/TTF/{;p;g;p;}"

Explanation: For each .zip file, 7zip produces an output that starts with “Path=” followed by file path and name. We start by storing the lines including the word “Path” with sed “hold” command (/Path.*$/h).

Then, when a file including “ttf” is output in the listing, we:

  • First, define a group with brace command ({)
  • Then we print the line with print command (p).
  • After we print the line, we get (g) the file name we held;
  • After that, we end the group with the right brace command (});
Este sitio web utiliza cookies. Al utilizar el sitio web, usted acepta almacenar cookies en su computadora. También reconoce que ha leído y entendido nuestra Política de privacidad. Si no está de acuerdo abandone el sitio web.Más información
en/bat/find_zip_files_wich_contain_fonts.txt · Última modificación: 2021/03/20 06:52 por nepenthes