I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like this afterwards;
Titel Blahh Blahh abllk sdhsd sjdhf
Category:The Blahh
Blahh Blah Blahh
Blahh
- Question: how should the syntax be, if the sed command itself should be a variable, like:
insertcat="sed "2i\\${n}Category:$cat\n""