8000 GitHub - gergelyk/para-cada: Executes your command for each file selected using glob expression(s).
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gergelyk/para-cada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

para-cada

PyPI - Version PyPI - License PyPI - Downloads

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 how glob expressions work and executes the entire command with subsequent values corresponding to your glob expression. Additionally, users may transform/filter/sort those values using regular Python syntax. Take a look at the documentation.

Installation

Requirement: Python >= 3.8

pip install para-cada

About

Executes your command for each file selected using glob expression(s).

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0