The following sed command gives a sed unterminated `s' command. It has to do with the variable that I put in ($header):
sed -i "1s~^~$header~" $1"/main.cpp"
The following is the contents of $header:
//
// Pacman.java
// etc
//
// Created by ayman at 12/06/2021
// Copyright (c) 2021 Google. All rights reserved.
//
In the sed command, I've used a different delimiter (~), but that still gives the error. Does anyone see what the problem is?