in reply to One to one file output idiom
perl -pwe 'open STDOUT, ">", "$ARGV.txt" if $last ne $ARGV; s/.*/\U$&/ +; $last = $ARGV' *.obj
Update: Using eof is a bit cleaner, but it still triggers at a wrong time, so it couldn't be used directly:
perl -pwe 'open STDOUT, ">", "$ARGV.txt" unless $e; $e = ! eof; s/.*/\ +U$&/' *.obj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One to one file output idiom
by LanX (Saint) on Jan 15, 2020 at 18:44 UTC | |
by Eily (Monsignor) on Jan 16, 2020 at 09:06 UTC |