Ceci est une ancienne révision du document !
Pour remplacer des trucs de Wiki.js
sed -i.bak2 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' cube.txt sed -i.bak2 's/<!-- SUBTITLE: \([^>]*\) -->/===== \1 =====/g' cube.txt
Suite à la conversation :
<tierce> hello how to search for <!-- TITLE: and replace with ====== using sed ? <Riviera> # echo '<!-- TITLE:<!-- TITLE:<!-- TITLE:' | sed 's/<!-- TITLE:/======/g' <shbot> Riviera: ================== <tierce> thank you ! <tierce> is it possible to replace ====== some title ====== by ====== some title ====== using sed ? <Riviera> That would be <Riviera> <!-- TITLE: ... until the end of the line? <tierce> and keep the « some title » text ? <Riviera> What if there are other tags on the same line, or what if the title spans multiple lines? <Riviera> sed is likely not the best tool to process your data <Riviera> Anyway, if it is to the end of the line: <tierce> the title does not span on multiple line <Riviera> # echo '<!-- TITLE: some title' | sed 's/<!-- TITLE:/======/;s/$/ ======/' <shbot> Riviera: ====== some title ====== <Riviera> ah <Riviera> i missed the -->, sorry. <Riviera> So that's a bit complicated in sed, let me think. <tierce> if another tool is necessary, what would you recommand ? <Riviera> Since your data is XML I'd recommend something that understands XML. Perhaps xmlstarlet or xmllint. <tierce> ok.. it helps me for the moment, and if it's not enough, I'll have a look on xmlstartel or xmlint. <tierce> thanks for your help <Riviera> well hm, since you are not looking for a robust solution anyway, <Riviera> perhaps this would suffice for your current situation: <Riviera> # echo '<!-- something -->====== some title ======<!-- something -->' | sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g' <shbot> Riviera: <!-- something -->====== some title ======<!-- something --> <Riviera> sed 's/<!-- TITLE: \([^>]*\) -->/====== \1 ======/g'
Contenu de la page
English
Neutrinet asbl is organized in hubs (working groups, tasks forces, circles, …).
And we try to keep track of our meetings under those minutes.
*The purpose of the association is to maintain, develop and promote the use of information exchange networks, while respecting the principle of network neutrality
and defending fundamental rights, including the rights to free expression, access to information and respect for privacy, with the objectives of human development and the empowerment of network users.* Translation of the 4th article of our statutes
Do not hesitate to contact us or to come in a meeting
Français
Neutrinet asbl est organisées en hubs *(groupes de travail, cercles, équipe,…).
Et nous conservons une trace de nos réunions dans les PVs.
N'hésitez pas à nous contacter ou à venir nous rencontrer.
*L'association a pour objet le maintien, le développement et la promotion de l'usage des réseaux d'échange d'information, dans le respect du principe de
neutralité du réseau et la défense des droits fondamentaux incluant notamment les droits à la libre expression, à l'accès à l'information et au respect de la vie privée, avec les objectifs de développement humain et d'autonomisation des utilisateurs des réseaux.* Article 4 de nos status
Nous STATUS sur une page (en cours de développement).


