Executes your command for each file selected using glob expression(s).
Project description
para-cada
Para Cada in Spanish means For Each. The tool executes your command for each file selected using glob expression(s).
Why? Let's say you have multiple .tgz
archives and you would like to extract them in one shot. Some of the options available in bash are:
ls *.tgz | xargs -IT tar xzvf T
for T in *.tgz; do tar xzvf $T; done
find . -type f -name '*.tgz' -exec tar xzvf {} \;
All of them are relatively complex. This is where cada can help. Simply do:
cada 'tar xzvf *.tgz'
Cada knows where glob expression is. It executes entire command with subsequent values corresponding to this expression. Additionally, user may transform/filter/sort those values using regular Python syntax. Take a look at the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for para_cada-1.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c83ee80fdf3e79ed32430631c452f7852b6eee5123bcb0d97eeab2248a0995ba |
|
MD5 | d2d4e9000752516bb844e6d60b07efcf |
|
BLAKE2b-256 | b0a9b056382bfc580390504c4ef50c4d3a10d2a8fb41eb2bb52d34e0b85d7bf0 |