[geloest] Zeichenkette in Zeichenkette reinschieben (Linux Bash)

  • Hi !


    ich habe eine Zeichenkette die unterschiedlich lang sein kann und eine die Immer gleich lang ist...
    wie kriege ich die welche unterschliedlich lang ist in die die gleich lang ist ohne die Zeichen die nicht ersetzt werden zu veraendern.


    also
    1. Kette 123456
    2. Kette 0000000000
    Ergebnis 1234560000


    Und das Ganze in der bash


    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 ()

  • Oder so aehnlich (ausfuehrlichst)


    uwe

    server: yavdr trusty testing, 2 * L5420, 32GB, 64TB RAID6 an OctopusNet (DVBS2- 8 ) + minisatip@dsi400 (DVBS2- 4 )
    frontends: kodi und xine

  • Versuch ohne externe Programme. Reines Bash



    Ergibt:

    Code
    root auf HP-T5730 am 03.05.2016 14:22
    [~] # ./kette1in2.sh
    12345600


    Edit: da war jemand schon schneller ;)

  • Danke geht :)


    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

  • Passt wohl besser hierher ...

    HowTo: APT pinning

Jetzt mitmachen!

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