Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | Prochaine révisionLes deux révisions suivantes |
start [2019/07/09 12:16] – tierce | start [2019/07/09 12:23] – external edit 127.0.0.1 |
---|
<shbot> Riviera: ================== | <shbot> Riviera: ================== |
<tierce> thank you ! | <tierce> thank you ! |
<tierce> is it possible to replace <!-- TITLE: some title --> by ====== some title ====== using sed ? | <tierce> is it possible to replace ====== some title ====== by ====== some title ====== using sed ? |
<Riviera> That would be | <Riviera> That would be |
<Riviera> <!-- TITLE: ... until the end of the line? | <Riviera> <!-- TITLE: ... until the end of the line? |
<Riviera> well hm, since you are not looking for a robust solution anyway, | <Riviera> well hm, since you are not looking for a robust solution anyway, |
<Riviera> perhaps this would suffice for your current situation: | <Riviera> perhaps this would suffice for your current situation: |
<Riviera> # echo '<!-- something --><!-- TITLE: some title --><!-- something -->' | sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' | <Riviera> # echo '<!-- something -->====== some title ======<!-- something -->' | sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' |
<shbot> Riviera: <!-- something -->====== some title ======<!-- something --> | <shbot> Riviera: <!-- something -->====== some title ======<!-- something --> |
<Riviera> sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' | <Riviera> sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' |