💡 Overview¶
rew is a text processing CLI tool that rewrites FS paths according to a pattern.
How rew works¶
- Reads values from standard input.
- Rewrites them according to a pattern.
- Prints results to standard output.
Input values are assumed to be FS paths, however, rew is able to process any UTF-8 encoded text.
find -iname '*.jpeg' | rew 'img_{C}.{e|l|r:e}'
rew is also distributed with two accompanying utilities (mvb and cpb) which move/copy files and directories, based on rew output.
find -iname '*.jpeg' | rew 'img_{C}.{e|l|r:e}' -d | mvb