Results 1 to 4 of 4
hi friends.,
my ascii file is as shown
1 41.18324 117.2673 ***
2 41.18324 117.2799 12.78
3 41.18324 117.2925 ***
----------------
----------------
299859 37.65457 122.0885 16.8
299860 37.65457 122.1011 16.668
...
- 08-06-2008 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 10
replacing *** with 0 in ascii data file
hi friends.,
my ascii file is as shown
1 41.18324 117.2673 ***
2 41.18324 117.2799 12.78
3 41.18324 117.2925 ***
----------------
----------------
299859 37.65457 122.0885 16.8
299860 37.65457 122.1011 16.668
--------------------
------------------
657522 33.21582 127.602 23.532
657523 33.21582 127.6146 23.532
like wise i have 100's of files..
In all the files i have to replace the *** (represents no data in my file) with 0( zero).
i could not match those *** with the sed. ( am unfamiliar with regexp
)
any suggestions plz
thanks in advance..
Yagnesh
- 08-06-2008 #2That is the underlying problem, of course. And it's easily solved. google this:am unfamiliar with regexp
Code:regexp tutorial
--
Bill
Old age and treachery will overcome youth and skill.
- 08-06-2008 #3Linux User
- Join Date
- Jun 2007
- Posts
- 318
Plus you didn't list the sed command you tried to use.
- 08-07-2008 #4Just Joined!
- Join Date
- Feb 2008
- Posts
- 10
hi thanks for the replies...
i did it with
BTW thanks for not mentioning the code earlier..Code:sed 's/\*\*\*/0/g' filename


Reply With Quote