Here I am touching a few files to add a header to the markdown pages:

COUNT=1
while IFS=, read id name
do
    COUNT=`expr $COUNT + 1`
    if test "${name}"
    then
        #echo '\[\[!meta title="'${name}'"\]\]' >> general/$COUNT.mdwn
        sed -i "1i# ${name}" general/$COUNT.mdwn
    fi
done < titles.csv

I am assuming the ids are order for this silly example.

Feedback

Powered by Vanilla PHP feedback form