Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
bash equivalent for os.walk?

I am using 2to3 to fix my script library, and it seems to be a command line thing, not a shell thing.

I want to do all files from /home/me/scripts downward, assuming they end in .py. Is there an easy way to do 2to3 -y filename for each file under my folder in the shell?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

There's find command:

 find /home/me/scripts  -iname "*.py" -exec 2to3 {} \;

The -exec argument tell it to execute the command that follows after this argument, which is 2to3 {} in this case. For each file found, {} is replaced by the name of that file.

over 4 years ago · Santiago Trujillo Denunciar

0

bash 4 provides a way of doing recursive globbing.

shopt -s globstar
2to3 /home/me/scripts/**/*.py
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda