Monday, March 4, 2019 — 21:44

NAME

rlt – run commands in a loop with transformed arguments

SYNOPSIS

rlt –r substitution [ –r substitution ] –c command args ...

DESCRIPTION

Rlt runs command for each argument in args, with the results of performing each substitution on the argument available as an environment variable subN, where N represents the Nth substitution given to rlt. The original argument is available as sub0.

EXAMPLE

Given a directory of JPEG images, create a thumbnail and rename each.
rlt –r '/\.jpg$/\.jpeg/' –r '/(.*)\.jpg$/\1–thumb.jpeg/' \
c 'rc –c ''resample –x64 –y 64 $sub0 $sub2; mv $sub0 $sub1'' ' \
*.jpg

SEE ALSO

rc(1), sam(1)

BUGS

Fictional.
This could be done better in the shell.
Quoting commands can get ugly.