An open API service indexing awesome lists of open source software.

https://github.com/amekusa/feed.sh

Run arbitrary command for each line
https://github.com/amekusa/feed.sh

automation bash cli devops downloader queue shell

Last synced: 3 months ago
JSON representation

Run arbitrary command for each line

Awesome Lists containing this project

README

        

# FEED.SH
A commandline utility that runs arbitrary command for each line in files.

```
Usage:
feed -f -c

Examples:
feed -f urls.txt -c wget {item}
feed -f urls.txt -c 'wget {item}'

Options:
-h, --help : Show this help.
-f, --file : File(s) to iterate over.
Each line in the file is treated as an "item",
and is passed to the command specified with '--cmd' option.
Lines that are empty or start with '#' are ignored.
-q, --queue : Run in "queue" mode.
-c, --cmd : Command to run for each item.
Upon running, every occurrence of '{item}' in the command
gets replaced with the current item.
-s, --subst : Placeholder string to be replaced in the command. (default: {item})
-m, --match : Filter items with a regex pattern.
Matched groups can be referenced with '(#N)' in '--cmd'.
-w, --write : File to save failed items to.
The file can be passed to '--file' afterwards,
if you want to retry the failed items.
-u, --update : Save failed items to the same file as '--file'.
This option is a shortcut for like '-f items.txt -w items.txt'.
If '-f' was multiple, only the 1st file is chosen.
-d, --dedupe : Ignore duplicate lines.
-p, --parallel : Max number of processes to run in parallel. (default: 0)
-r, --retry : Max number of retries for a failed item. (default: 0)
-ri, --r-interval

````

---

(c) 2024 Satoshi Soma / amekusa.com