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
- Host: GitHub
- URL: https://github.com/amekusa/feed.sh
- Owner: amekusa
- Created: 2024-08-08T00:04:30.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-09-06T10:42:31.000Z (9 months ago)
- Last Synced: 2025-02-07T04:34:27.934Z (4 months ago)
- Topics: automation, bash, cli, devops, downloader, queue, shell
- Language: Shell
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FEED.SH
A commandline utility that runs arbitrary command for each line in files.```
Usage:
feed -f -cExamples:
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