in reply to String Search/Replace
The solutions above work in place. This one is a filter. To use it do something like this:#!/usr/bin/perl use strict; while (<>) { my ($timestamp, $number, @rest) = split; $number = 0 if ($number > 1000); print "$timestamp $number @rest\n"; }
But don't make output the same as input or the shell will kill your data../filter < input > output
Phil
|
|---|