I am trying to prepend text to the begging/header of a set of .vtt text files with sed in a loop. I'm not replacing any text, only adding text.
I need some line breaks in the text.
The text should read:
WEBVTT Kind: captions Language: eng File Creation Date: 2023-08
Here is what I am trying:
for file in *.vtt ; do sed -i '' 'WEBVTT/nKind: captions/nLanguage: eng/nFile Creation Date: 2023-08' "$file" done give me the error: sed: 1: 'WEBVTT/nKind: captions/ ...': invalid command code W
I'm not sure why. I tried switching double/single quotes, but that didn't work.