Simon Reinhardt <simon.reinhardt@stud.uni-regensburg.de> (Mi 27 Feb 2013 20:05:58 CET):
> Hallo Liste,
>
> Folgendes Problem: ich habe einen langen ASCII Text, in dem Zahlen
> vorkommen. Ausschnitt:
> [...]
> (bookmarks
> ("Cover" "#1")
> ("Contents" "#4")
> ("Preface" "#10")
> ("Notations and Conventions" "#18")
> ("Editor's Foreword" "#21")
> ("I Feynman Diagrams and Quantum Electrodynamics" "#22"
> [...]
> Gibt es einen Weg, wie ich alle Zahlen um eine Konstante erhöhen kann?
> Also z.B. 1 -> 22, 4 -> 25 etc.
> Das von Hand zu machen würde ewig dauern...
>
perl -pe 's/(?<=#)(\d+)/$1+10/e' < text
Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
gnupg encrypted messages are welcome --------------- key ID: 7CBF764A -
gnupg fingerprint: 9288 F17D BBF9 9625 5ABC 285C 26A9 687E 7CBF 764A -
(gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B)-
Attachment:
signature.asc
Description: Digital signature