Replace negative numbers with 0 in a file
From: Mayank (mayank_mact_at_yahoo.com)
Date: 11/28/03
- Next message: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Previous message: Steve: "Fetching blob field get memory allocation error"
- Next in thread: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Reply: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Nov 2003 21:49:09 -0800
X-No-Archive: yes
Hi,
I have to replace all the negative numbers with 0 in a very large
file. How can I do it in Perl/Awk. Negative numbers are of the format
(-0.02:0.01:-1.00) ( 0.11:0.01:-0.01)
I need to change them to
(0:0.01:0) (0.11:0.01:0)
Positive numbers should remain untouched.
Thanks in advance.
Regards
Mayank
- Next message: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Previous message: Steve: "Fetching blob field get memory allocation error"
- Next in thread: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Reply: Mike Cross: "Re: Replace negative numbers with 0 in a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]