usage: with [-v] [-e] files : command
usage: with [-v] [-s] [-S] [-f] [-t types] files : [command]
with [-v] [-s] [-S] [-f] [-t types] files :: ['perl code']
... | with [-v] - : [command]
... | with [-v] - :: ['perl code']
options: -v verbose mode
-s interactivly select files before command execution
-S like -s but show more file attributes
-e like -s but also edit command
-f force mode : no file checking
-t select file types (may be combined):
f = regular file
d = directory
l = link
p = named pipe
s = special (device)
files: special wildcard ":" is expanded to all subdirs
command: %F is expanded to all file names
%f is expanded to single file names
%f:old:new: is expanded to single file names with substitution
perl code: $f contains single file
@F contains all files
examples: with *.jpg : jpegtran -rotate 90 %f
with *~ : mv %f %f:~:.old:
with -t d * : echo Directories: %F
with -S xlab* : rm %F
with /etc/:*rc : wc %F # with directory recursion!
with * :: '@s = stat($f); print "$f inode=$s[1]\n"'
with :*.pl :: 'print "@F\n"'
zz | with - : mv %F /tmp/