Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • zgrep -v '^ftp.itransact'

    Of course once you add in a shell loop to iterate over the files and re-gzip them it starts to look like your original code :-)

    • Yeah, true. zgrep's pretty handy for scanning but not so much use for in-place mods, so far as I've seen. I'm sure it's possible with some of bash's more esoteric (for me!) constructs... But why bother when perl's there, heh. It's funny watching these little hacks have perl appear in there somewhere (f=`perl ...`), then as more functionality is needed, more of it gets shoe-horned into the perl invocation until *pop* it's all in perl and it gets re-written "properly":
      #!/bin/sh
      exec perl $0.pl
      :-)