[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Søg og addere - regex?



Hej NG, jeg er på usikker grund.
Jeg har en stor text fil (csv, med , som felt seperator og " som tekst/indholds afgrænser) hvori jeg har brug for at justere værdien i en linje i to felter i alle poster:

  S,value: 1E-n

skal ændres til:

  S,value: 1E-n+2

Eksempel:

  S,value: 1E-2  ->    S,value: 1E-4
  S,value: 1E-7  ->    S,value: 1E-9
  S,value: 1E-13  ->    S,value: 1E-15

(der er i øvrigt linjeombrydning både før og efter hver af disse "S,value: 1E-n" Jeg kunne nok selv finde ud af at lave søg og erstat, men så skal der ittereres mange gange og jeg riskerer at (vil hel sikkert ske) erstatte resultatet fra et tildligere gennemløb med et nyt - og derved ende med forkerte værdier.

Håber I kan hjælpe (og spare mig for mange timers manuel redigering)

På forhånd tak
--
Med venlig hilsen
/Zmit/
RLU # 314205


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-04-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *