Where are you watching from and how is the weather at your place?
bash: "for" unfortunately does not end with "rof"
I am not familiar with this expression. It get's parsed? What does it mean, please?
Have a look at fire which is like click, but less boilerplate (but maybe not so powerful as click) +1
+1 for reading from file (especially a struct like written in json)
What are the underscores for, please?
-I _
I instructed xargs to replace underscores by the files it got from find
, this was my choice, I could have done -I x
instead and then it would replace "x"Python:
from multiprocessing import Pool
from pathlib import Path
def task(filename):
# computationally intensive task
# or even shell process using os.system(..) or subprocess.run(..)
print(filename)
with Pool() as pool:
files = Path.cwd().glob("*.jpg")
pool.map(task, files)