help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

append tag to thousand of files


From: Silvio Siefke
Subject: append tag to thousand of files
Date: Sat, 2 Jan 2021 09:14:07 +0100

Hello

first of all, I wish everyone a happy and healthy New Year.

I have a question, maybe someone has an idea for a way without 
I have to click through thousands of files.

I have several multilingual websites written in Markdown. I would 
now like to add a geotag to the website. For the German website,
this is largely done.

Header of MD File:
---
title: ""
date: 
tags: ""
draft: true
shorttext: ""
cover: "cover/.jpg"
lang:
---

The filenames have in all languages the same name, with grep the
geo tag could be read out and write to file like:

***
grep -r "geo:" | sed 's/:/ /g' | sed 's/  /: /g'
how-people-become-resources.md geo: "Welt"
la-vie-product-recommendations.md geo: "Europa"
the-challenge-of-peace.md geo: "Welt"
corporations-lie.md geo: "Welt"
the-green-hypocrites.md geo: "Europa"
lets-celebrate-free-enterprise.md geo: "Europa"
how-to-annoy-people.md geo: "Asien"
the-values-of-hypocrisy.md geo: "Asien"
the-drug-terror.md geo: "Welt"
***

This is from german page and now the question is there a way to 
search in other language folders the filename and put the geo tag to
header after tags: "" line?

---
title: ""
date: 
tags: ""
geo: ""
draft: true
shorttext: ""
cover: "cover/.jpg"
lang:
---

Would be really great. Thank you for the voices. Lovely Weekend.

-- 
Silvio Siefke

Attachment: pgplMmhKmPq5B.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]