You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
305 B
Bash

#! /bin/sh
2 years ago
for noteDir in "$1/notes/*"; do
2 years ago
echo "noteDir: $noteDir"
2 years ago
noteName=$(echo $noteDir| cut -d'/' -f3)
2 years ago
notePath="$(echo $noteDir| cut -d'/' -f1-2)/$noteName"
echo "noteName: $noteName"
echo "notePath: $notePath"
sed -i "s#Resources/attachments#notes/$noteName#" $notePath/index.md
done