Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

930.Text data calculation -- How to multiply every number by 1000 in a text file?

User: caoyongrui -- 2012-03-26          << 929  931 >>
Hits: 5089
Type: Text data calculation   
Search all Text data calculation examples
Description:
How to calculate the number in the text file and don't change other words ? 
Just like the text file as bellow, I want to make the number in the text file multiply 1000 (x1000) but don't change other words? 
Input Sample:
asel,s,loc,z,0,20 
wpoffs,,,0.15 
asbw,all 
csys,wp 
asel,s,loc,z,0,20 
wpoffs,,,0.08 
asbw,all 
csys,wp 
asel,s,loc,z,0,20 
wpoffs,,,0.47 
asbw,all 
csys,wp 
asel,s,loc,z,0,20 
wpoffs,,,0.1 
asbw,all 
csys,wp 
asel,s,loc,z,0,20 
wpoffs,,,0.15 
asbw,all 
csys,wp 
b=0.3 
d=0.745 
asel,s,loc,z,0.7-a,0.7+a 
asel,r,loc,y,0.001,0.257
Output Sample:
asel,s,loc,z,0,20000 
wpoffs,,,150 
asbw,all 
csys,wp 
asel,s,loc,z,0,20000 
wpoffs,,,80 
asbw,all 
csys,wp 
asel,s,loc,z,0,20000 
wpoffs,,,470 
asbw,all 
csys,wp 
asel,s,loc,z,0,20000 
wpoffs,,,100 
asbw,all 
csys,wp 
asel,s,loc,z,0,20000 
wpoffs,,,150 
asbw,all 
csys,wp 
b=300 
d=745 
asel,s,loc,z,700-a,700+a 
asel,r,loc,y,1,257
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file 
2. ctrl-h open 'replace' dialog 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
3. click 'replace', done. 
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to multiply the fifth column by 10 in a text file? (75%)
How to duplicate every letter of a-z and A-Z in a text file? (67%)
How to multiply all money amount in a text file by 9? (66%)
How to count number of digits(0-9) in a text file? (66%)
How to randomly deletes x number of lines from text files? (65%)
How to calculate summary of every column in a text file? (64%)
How to join every n lines into 1 line in a text file? (64%)
How to calculate the summaries of every line in a txt file? (61%)

Check Demo of Text data calculation
Keywords:
odd  multiply  toc  calculate  calculation  calcu  calculat  100  every  data  multiply every number in a file  multiply every number text  multiply every number in text file  text file number multiply  multiply number in text file  multiply a number and replace in a file  multiply in text file  multiply number