Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
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 answers
Answer question

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 Report

0

bash 4 provides a way of doing recursive globbing.

shopt -s globstar
2to3 /home/me/scripts/**/*.py
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!