Nochmals Skript-Frage - grep zwischen 2 "Markern"
Hallo Liste, habe doch nochmal eine Skriptfrage. Und zwar: wie kann ich Text zwischen 2 Markern greppen (also grep -o) und zwar bräuchte ich von der Zeile {<</PageSize [2494.488037 3685.039063] /Policies <</PageSize 1>> >> setpagedevice }stopped pop alles zwischen dem "[" und "]". Google hilft leider nicht richtig weiter (oder ich seh's nicht). Danke Joachim
Joachim, hier hab ich selber viel gefunden: http://linuxreviews.org/beginner/abs-guide/en/index.html aber und hier: http://linuxreviews.org/beginner/abs-guide/en/c12567.html hoffe es hilft, Calli
Hallo Joachim. Joachim Kieferle wrote:
Hallo Liste,
habe doch nochmal eine Skriptfrage. Und zwar: wie kann ich Text zwischen 2 Markern greppen (also grep -o) und zwar bräuchte ich von der Zeile
{<</PageSize [2494.488037 3685.039063] /Policies <</PageSize 1>> >> setpagedevice }stopped pop
alles zwischen dem "[" und "]".
Das geht mit sed oder awk. Leider ist sed bescheiden dokumentiert. Aber mit den info-seiten und reichlich probieren kriegst Du es bestimmt raus ;-) - mach' ich auch immer so. Arno
Google hilft leider nicht richtig weiter (oder ich seh's nicht).
Danke
Joachim
-- IT-Service Lehmann al@its-lehmann.de Arno Lehmann http://www.its-lehmann.de
participants (3)
-
Arno Lehmann
-
Carl A. Schreiber
-
Joachim Kieferle