functional map for unix shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Cargo.lock
Cargo.toml
readme.md

readme.md

map

Runs command for every item in stdin. Similar to xargs.

Use:

$ echo hey | map ,, echo ,, ,,
hey hey
$ (echo hey; echo there) | map a echo a a a
hey hey hey
there there there
$ echo hey | map a echo a, a, a | map a echo a, a, a.
hey, hey, hey, hey, hey, hey, hey, hey, hey.
$ ls | map ,, realpath ,,
/Users/a/d/map/Cargo.lock
/Users/a/d/map/Cargo.toml
/Users/a/d/map/readme.md
/Users/a/d/map/src
/Users/a/d/map/target
# using space as a separator
$ echo hey you fhqwhgads | map -s " " ,, echo ,,
hey
you
fhqwhgads

Installation

  1. You'll need the rust compiler.
  2. Clone this repo, then run cargo install.