[gelöst] sed bis ans ende der Datei loeschen

  • Hi !


    Ich will nach einem Muster suchen und dann inklusive Muster bis zum Ende loeschen...
    mit sed '/MUSTER/d' Textdatei kann ich zumindest die Zeile loeschen....
    und die +K ist keine option weil ich nicht weiss wie lange die Datei ist.


    Ich google jetzt schon den halben Tag aber nix hat mich wikrlich weiter gebracht...


    Gruss Gerd

    vdr => p8b75-m lx / pentium g2020t / 8 GB Ram / zotac gt 630 / cine S2 V5.5 / 60 gb ocz ssd / 640 gb wd scorpio blue / display noritake 256x64-3900 / chenbro PC71023 gehaeuse / yavdr stable / softhddevice


    spielsystem => p8b75-m le / intel core i3 3220T / ubuntu lts 14.04 / 16 GB ram / zotac gt 630 / cine S2 V6.2 / yavdr stable pakete / softhddevice / pulseaudio+alsa


    spielwiese => Zotac Zbox ID45 / 120 GB mSATA / via Satip => Octopus Net / yavdr stable / softhddevice

    Einmal editiert, zuletzt von gerdh ()

  • Hi !


    ok werds mal probieren....


    sed '/MUSTER/$d' Textdatei


    soll angeblich auch gehen.


    Gruss Gerd

    vdr => p8b75-m lx / pentium g2020t / 8 GB Ram / zotac gt 630 / cine S2 V5.5 / 60 gb ocz ssd / 640 gb wd scorpio blue / display noritake 256x64-3900 / chenbro PC71023 gehaeuse / yavdr stable / softhddevice


    spielsystem => p8b75-m le / intel core i3 3220T / ubuntu lts 14.04 / 16 GB ram / zotac gt 630 / cine S2 V6.2 / yavdr stable pakete / softhddevice / pulseaudio+alsa


    spielwiese => Zotac Zbox ID45 / 120 GB mSATA / via Satip => Octopus Net / yavdr stable / softhddevice

  • hi !


    Danke.... ich bin schon heissgelaufen weils auch net ging......
    hopsi
    bei deinem scheint es mir nur die naechste Zeile zu loeschen....


    Gruss Gerd

    vdr => p8b75-m lx / pentium g2020t / 8 GB Ram / zotac gt 630 / cine S2 V5.5 / 60 gb ocz ssd / 640 gb wd scorpio blue / display noritake 256x64-3900 / chenbro PC71023 gehaeuse / yavdr stable / softhddevice


    spielsystem => p8b75-m le / intel core i3 3220T / ubuntu lts 14.04 / 16 GB ram / zotac gt 630 / cine S2 V6.2 / yavdr stable pakete / softhddevice / pulseaudio+alsa


    spielwiese => Zotac Zbox ID45 / 120 GB mSATA / via Satip => Octopus Net / yavdr stable / softhddevice

  • hi !


    ich habs es mal probiert und die eine Zeile markiert



    Gruss Gerd

    vdr => p8b75-m lx / pentium g2020t / 8 GB Ram / zotac gt 630 / cine S2 V5.5 / 60 gb ocz ssd / 640 gb wd scorpio blue / display noritake 256x64-3900 / chenbro PC71023 gehaeuse / yavdr stable / softhddevice


    spielsystem => p8b75-m le / intel core i3 3220T / ubuntu lts 14.04 / 16 GB ram / zotac gt 630 / cine S2 V6.2 / yavdr stable pakete / softhddevice / pulseaudio+alsa


    spielwiese => Zotac Zbox ID45 / 120 GB mSATA / via Satip => Octopus Net / yavdr stable / softhddevice

  • Interessant...



    Getestet mit Cygwin sed 4.2.2, Gentoo sed 4.2.1


    busybox sed 4.0:


    Code
    vdr64 tmp # busybox sed --version
    This is not GNU sed version 4.0
    vdr64 tmp # busybox sed '/inserted.*/,//d' resolv.conf
    search hoerst.net
    nameserver1 192.168.63.254
    nameserver 192.168.63.1
    vdr64 tmp # busybox sed '/inserted.*/,$d' resolv.conf
    search hoerst.net
    nameserver1 192.168.63.254


    Deine scheint wohl irgendwie nochmal anders zu ticken. Nutzt MLD auch busybox?


    Nimm die Variante von kls, die passt. Meine scheint wackelig.


    Christian

  • Hi,
    bei easyvdr gibts dazu ein Skriptchen:
    https://launchpad.net/~easyvdr…70/+listing-archive-extra
    nennt sich Tripatch, guck mal im Wiki:


    http://wiki.easy-vdr.de/index.php?title=Tripatch


    MfG,
    Stefan

    Test-VDR1: HP rp5700 Fertigsystem, Core2Duo E6400, 2GB RAM, FF-SD C-2300, nvidia Slim-GT218 x1 | easyVDR 2.0 64Bit
    VDR3: in Rente

    VDR4: MSI G31M2 v2, Digitainer2-Geh., t6963c 6" gLCD, E5200, 2GB, 3TB WD Red, GT730, 2x TT S2-3200; easyVDR 3.5 64bit
    VDR5: Gigabyte
    GA-G31M-S2L, Intel E2140, Zotac GT730 passiv, Digitainer2-Geh., t6963c 6 " gLCD, 2 TB WD Red, 2x TT S2-3200 (an 1 Kabel) easyVDR 3.5 64bit
    VDR6:
    Intel E5200, GT630 passiv, F1 750 GB, t6963c gLCD, 2x TT S2-3200 | easyVDR 3.5 64bit
    VDR-User #1068
    www.easy-vdr.de

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!