-
Notifications
You must be signed in to change notification settings - Fork 10
Utilities
vbrover edited this page Jun 19, 2020
·
4 revisions
The executables are in the directory $DT/
.
Print file hash class: 0..999
Example:
$ file2hash "mouse"
532
Apply <command>
to all <items>
.
Usage:
trav <items> <command>
<items>
: file with a list of items or directory.
<command>
: Text with special symbols: "%d" = , "%f" - item, "%1" - subitem #1, "%2" - subitem #2, ... "%9" - subitem #9, "%h" - item hash (0..999), "%n" - sequential number, "%q" - single quote, "%Q" - double quote, "%D" - $, "%G" - `, "%P" - %.
Example:
$ cat list
cat
mouse
dog
$ trav list -noprogress "echo '%Q %G %P %D %d %n %h %f'"
" ` % $ list 1 59 cat
" ` % $ list 2 532 mouse
" ` % $ list 3 41 dog