Using CSV values to insert text

Published: Wednesday, Oct 21, 2009 Last modified: Wednesday, Feb 24, 2021

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.